VarDrop {DataCombine} | R Documentation |
Drop one or more variables from a data frame.
Description
VarDrop
drops one or more variables from a data frame.
Usage
VarDrop(data, Var)
Arguments
data |
a data frame. |
Var |
character vector containing the names of the variables to drop. |
Examples
# 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'))
[Package DataCombine version 0.2.21 Index]