Closed simonedelsa closed 1 year ago
Performing ks test with a condition (e.g., case_when) does not run. See part of the (new) code for indicator 2 below:
[...] test = dplyr::case_when( npre > 0 & npost == 0 ~ 1, # not at risk, pvalue=1 npre == 0 & npost > 0 ~ 0, # at risk, pvalue=0 # npre > 0 & npost > 0 ~ test(var = {{ contract_value }}, group = prepost, data = ., test_type)[1], TRUE ~ test(var = {{ contract_value }}, group = prepost, data = ., test_type)[1] )
It seems that the condition is not checked and "test" function has been ran anyway, thus detecting an error (prepost with only one level)
PS: for the moment, it is fixed by including an "if" within "test" function (if group has only one level, then skip)
solved in 3ab9ae7 + 8ec8ca0!
Performing ks test with a condition (e.g., case_when) does not run. See part of the (new) code for indicator 2 below:
It seems that the condition is not checked and "test" function has been ran anyway, thus detecting an error (prepost with only one level)
PS: for the moment, it is fixed by including an "if" within "test" function (if group has only one level, then skip)