I am trying to wrap my head around how DataShield handles Logical variables. For example, ds.table coerces a Logical to Factor implicitly. Yet the Data Presentation functions, don’t. ds.boxPlot reports an error if a Logical is passed instead of a Factor.
Does one have to use ds.asFactor here? If so, how?
Yes many functions do not work with logical variables, so it is better if you convert a logical to a factor. I guess with a box plot you mean to show the distribution of a numeric variable for TRUE/FALSE cases of a logical variable, is that right?
If yes, then look how you can do it in this example: