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

View source: R/utils.R

VarDropR 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'))


nyu-mhealth/Mobility documentation built on July 4, 2025, 9:54 a.m.