Description Usage Arguments Value Author(s) Examples
Converts variables of a data frame in factors
1 | convert_factor(data, vars)
|
data |
the data frame in which we can find |
vars |
vector of character string of covariates |
The modified data frame
Hugo Varet
1 2 3 | cgd$steroids
cgd$status
cgd=convert_factor(cgd,c("steroids","status"))
|
Loading required package: survival
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0
[112] 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[149] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[186] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[1] 1 1 0 1 1 1 1 1 1 1 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 1 1 1 0 1 1 1
[38] 0 0 1 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 1 0 1 1 0 0 0 0 0 1 1 0 0 0 0 0
[75] 1 1 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 0 0 1 0 0 1 1 1 0 0 0
[112] 0 1 0 1 1 0 1 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0
[149] 1 1 0 0 1 0 0 0 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
[186] 0 0 1 1 1 0 0 0 1 0 0 0 1 0 0 1 0 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.