View source: R/summary_statistics.R
Retain the class of a variable when using ifelse. Copied from http://stackoverflow.com/questions/6668963/how-to-prevent-ifelse-from-turning-date-objects-into-numeric-objects.
1 | safe.ifelse(cond, yes, no)
|
cond |
Condition |
yes |
action if variable meets condition |
no |
action if variable does not meet condition |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.