Learn R Programming

splitstackshape (version 1.0)

othernames: Extract all names from a data.frame other than the one listed

Description

A convenience function for setdiff(names(data), -some_vector_of_names-).

Usage

othernames(data, toremove)

Arguments

data
The input data.frame.
toremove
The names you want to exclude.

Value

  • A character vector of the remaining names.

See Also

setdiff

Examples

Run this code
mydf <- data.frame(a = 1:2, b = 3:4, c = 5:6)
splitstackshape:::othernames(mydf, "a")

rm(mydf)

Run the code above in your browser using DataLab