num2factor | R Documentation |
Convert a numeric column in a data.frame to a factor
num2factor(data, call, name, no = 3)
data |
A data.frame |
call |
a function call |
name |
character Name of numeric column |
no |
numeric |
A data.frame
num2factor(anderson,name="logWBC")
library(survival)
fit=coxph(Surv(time,status)~logWBC+rx,data=anderson)
num2factor(anderson,call=fit$call,name="logWBC",no=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.