Description Usage Arguments Value Author(s) See Also Examples
Given a set of variable names (or integers), remove (or keep) these columns from a dataset
1 |
... |
objects (either vectors of strings, vectors of numbers, or both) |
data |
the dataset you're trying to eliminate (or keep) variables from |
keep |
should the variables be kept (keep=T) or dropped (keep=F)? |
a dataset, containing the variables of interest only
Dustin Fife
1 2 3 4 5 6 7 8 9 10 11 | data = data.frame(matrix(rnorm(100), ncol=5))
names(data) = LETTERS[1:5]
#### extract only the classification
data(iris)
new.data = make.null(c("Sepal.Length"),
r("Sepal.Width", "Petal.Width", names(iris)), data=iris)
#### extract all but the classification
new.data2 = make.null(c("Sepal.Length"),
r("Sepal.Width", "Petal.Width", names(iris)), data=iris, keep=TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.