pveber / morse

Companion R package for MOSAIC website
7 stars 5 forks source link

In survDataCheck, why do we need to "assert all replicates are available for each time point" ? #250

Closed virgile-baudrot closed 6 years ago

virgile-baudrot commented 7 years ago

This requirement that all replicates are available for each time point prevent the analyze of a dataset with different time point. This can be a constraint when the user want to pool several dataset for instance.

I don't see why this property is necessary, but in that case, why is it checked?!

virgile-baudrot commented 7 years ago

A reason is when gathering replicates with the same concentration.

However, in the function gather_survDataCstExp() in modelData.survDataCstExp(), the number of couple (time, replicate) is already checked.

  ### Check the same number of (time, replicate) for a common concentration
  df_checkTimeReplicate <- x %>%
    dplyr::group_by(conc, time) %>%
    dplyr::summarise(nbrReplicate_ConcTime = n_distinct(replicate)) %>%
    dplyr::group_by(conc) %>%
    dplyr::summarise(nbrReplicate_uniqueConc = length(unique(nbrReplicate_ConcTime))) 

To be clearer I'm going to make a function of the above code with a test.

pveber commented 6 years ago

ok!