everything_except: Get symbols for all columns except ...

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

This convenience function performs a set difference between the columns of .DF and the variable names (or symbols) given in .... The return value is a list of symbols.

Usage

1
everything_except(.DF, ..., .symbols = TRUE)

Arguments

.DF

a data frame whose variable names are to be differenced

...

a string, strings, vector of strings, or list of strings representing column names to be subtracted from the names of .DF

.symbols

a boolean that defines the return type: TRUE for symbols, FALSE for strings

Value

a vector of symbols (when symbols = TRUE) or strings (when symbol = FALSE) containing all variables names except those given in ...

Examples

1
2
3
4
5
DF <- data.frame(a = c(1, 2), b = c(3, 4), c = c(5, 6))
everything_except(DF, "a", "b")
everything_except(DF, "a", "b", symbols = FALSE)
everything_except(DF, c("a", "b"))
everything_except(DF, list("a", "b"))

matsindf documentation built on Aug. 24, 2020, 5:09 p.m.