Case_when equivalent in DataSHIELD


I was wondering if there was a case_when equivalent in DataSHIELD. dsSwissKnife or similar packages are also fine, if not in dsBase.


Hi there,

I’m currently developing a ds.tidyverse package which will include the case_when function. I’m hoping to have an initial release of this within a few months.



1 Like

Hi Ahmet,

While waiting the development of ds.tidyverse, you can use the combination of ds.Boole and ds.make functions to apply the case_when conditions. See for example this: Fill in missing values of variable with values of second variable: ds.replaceNA? and let me know if you need any help with this.

Thanks, Demetris

1 Like