I have the following data.frame called training:
event.5    er     her2   lymph   grade
TRUE       TRUE   FALSE  FALSE   3
FALSE      FALSE  TRUE   FALSE   3
...
I would like to convert all columns in factors using:
training <- do.call(as.factor, training)
But I get the following error:
Error in (function (x):
unused arguments (event.5 = c (TRUE, FALSE,...)
I can manually convert each column as factor but I want something more elegant. I would greatly appreciate any suggestion. Thank you!
 
     
     
    