Description Usage Arguments Value Examples
View source: R/extractVariable.R
This function extract variables which match specified mode from data.frame, and make a new data frame.
1 | extractVariable(data = NULL, mode = "numeric")
|
data |
a data.frame from which numeric variables are extracted. |
mode |
a character specifying object type. Object modes of ‘numeric’, ‘character’, ‘factor’, and ‘logical’ are supported. |
a data.frame which includes only specified mode of variables.
1 2 3 4 | df <- data.frame(id=seq(1,10), str=letters[1:10], fac=factor(seq(1,10)), stringsAsFactors=FALSE)
extractVariable(df)
extractVariable(df, mode="character")
extractVariable(df, mode="factor")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.