VarDrop: Drop one or more variables from a data frame.

Description Usage Arguments Examples

View source: R/utils.R

Description

VarDrop drops one or more variables from a data frame.

Usage

1
VarDrop(data, Var)

Arguments

data

a data frame.

Var

character vector containing the names of the variables to drop.

Examples

1
2
3
4
5
6
7
8
9
# 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'))

DataCombine documentation built on May 30, 2017, 2:52 a.m.