autoVarClass | R Documentation |
automatically chage variable mode in a data.frame.
autoVarClass(data, lenTab = 10, thresh = 0.8)
data |
a data.frame object. |
lenTab |
length of a single variable elements. |
thresh |
thershold value when transform a variable into numeric. |
some discrete variables maybe coded into integer, eg. sex (male=1,female=2),and should be treated as character or factor when analyzing. autoVarClass can be used to automatically detect variable mode in a data.frame.
autoVarClass(data=mtcars,lenTab=10,thresh=0.75)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.