selectVariable: Select variables to keep or drop.

Description Usage Arguments Value Examples

View source: R/selectVariable.R

Description

Select variables to keep or drop and a data frame in which variables are kept or dropped is returned.

Usage

1

Arguments

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.

Value

a data frame in which variables are kept or dropped.

Examples

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"))

epifit documentation built on May 29, 2017, 3:43 p.m.