Case_when equivalent in DataSHIELD

Hi!

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

Cheers.

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.

cheers

Tim

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

Hi Ahmed,

There are now development versions of dsTidyverse and dsTidyverseClient available, which contain the functions ds.case_when() and caseWhenDS. You can find the packages here:

Best, Tim

1 Like

This is great news!

Very glad to see you making big strides with ds-tidyverse :slight_smile: