Description Usage Arguments Value Examples
View source: R/selectVariable.R
Select variables to keep or drop and a data frame in which variables are kept or dropped is returned.
1 |
data |
a data frame in which variables are included. |
keep |
a character vector specifying variables to keep. |
drop |
a character vector specifying variables to drop. |
a data frame in which variables are kept or dropped.
1 2 3 | df <- data.frame(id=seq(1,10), str=letters[1:10], fac=factor(seq(1,10)), stringsAsFactors=FALSE)
selectVariable(df, keep=c("id", "str"))
selectVariable(df, drop=c("fac"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.