VarDrop | R Documentation |
VarDrop
drops one or more variables from a data frame.
VarDrop(data, Var)
data |
a data frame. |
Var |
character vector containing the names of the variables to drop. |
# Create dummy data
a <- c(1, 2, 3, 4, NA)
b <- c( 1, NA, 3, 4, 5)
c <- c(1:5)
d <- c(1:5)
ABCData <- data.frame(a, b, c, d)
# Drop a and b
DroppedData <- VarDrop(ABCData, c('b', 'c'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.