filterVars | R Documentation |
Filter duplicate variables from findVars
filterVars(x, ...)
x |
Output from |
... |
Filter terms. The name corresponds to the variable name for which to remove duplicates. Each term is a named vector whose names correspond to columns in 'x'. The values provide patterns for the given column to match. |
findVars()
may identify multiple
variables with the same name. This function can be used
to select among these duplicates.
The subset of 'x' that satisfies the supplied filters or that were not provided a filter.
## Not run:
varnames <- c("kz021","kz011b","ype9670", "c645a")
vars <- findVars(varnames)
vars <- subset(vars, subset=tolower(name) %in% varnames)
vars <- filterVars(vars, kz021=c(obj="^kz"),
kz011b=c(obj="^cp", lab="Participant"),
c645a=c(cat2="Quest"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.