diff --git a/DESCRIPTION b/DESCRIPTION index bb72a99..557f721 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: simcausal Type: Package -Version: 0.5.2.00 +Version: 0.5.3.00 Title: Simulating Longitudinal Data with Causal Inference Applications Authors@R: c( person("Oleg", "Sofrygin", role=c("aut", "cre"), email="oleg.sofrygin@gmail.com"), diff --git a/NEWS b/NEWS index 23b3ad3..7631c94 100644 --- a/NEWS +++ b/NEWS @@ -76,3 +76,9 @@ simcausal 0.5.1 * Switching to new naming convention for categorical distributions (rcat.b0, rcat.b1 and rcat.factor). Old rcategor.int and rcategor are still available and are deprecated. +simcausal 0.5.3 +============== + +* Fixing a bug in that was identified due to changes to data.table (eval.MSM() was incorrectly checking for NA outcomes) +* Fixing a CRAN error in test on R devel. + diff --git a/R/targetparam.r b/R/targetparam.r index df40329..0b09b75 100644 --- a/R/targetparam.r +++ b/R/targetparam.r @@ -473,8 +473,10 @@ eval.MSM <- function(DAG, df_full, outnodes, outnode_nms, params.MSM, attrs, ver } } - naout_byaction <- sapply(df_full, function(df) any(is.na(df[,outcome]))) # CHECK THAT NO OUTCOME NODES ARE MISSING (NA) - if (any(naout_byaction)) stop("Unable to evaluate MSMs outcome "%+%outcome%+% ", for action(s) ", paste(names(df_full)[naout_byaction], collapse=","), ", some observations are censored before the outcome, check DAG(s) defining the action(s)") + naout_byaction <- sapply(df_full, function(df) any(is.na(df[[outcome]]))) # CHECK THAT NO OUTCOME NODES ARE MISSING (NA) + if (any(naout_byaction)) stop("Unable to evaluate MSMs outcome "%+%outcome%+% ", for action(s) ", + paste(names(df_full)[naout_byaction], collapse=","), + ", some observations are censored before the outcome, check DAG(s) defining the action(s)") # * Combine all actions into one dataframe and convert to long format df_combine <- data.table::rbindlist(df_full, fill=TRUE)