Description Usage Arguments Value Examples
View source: R/subset_subcondition.R
this function subsets by some condition, but returns all information associated with those values of the meta variable 'meta.var' that would be in the standard subset returned by the same condition.
1 | subset_subcondition(x, meta.var = NULL, ..., select = NULL)
|
meta.var |
the meta variable |
... |
condition for subsetting passed to |
data |
the data, a data frame or some such thing |
a data frame
1 2 3 4 5 6 | d <- data.frame(id = rep(LETTERS[1:2], each = 2), z = 1:4)
## 'subset' returns the rows satisfying the condition
subset(d, z == 4)
## 'subset_subcondition' returns all rows such that the 'meta.var' value is
## in the standard subset returned, i.e. a (possibly) bigger set
subset_subcondition(d, meta.var = "id", z == 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.