Description Usage Arguments Value Examples
Note that this function is only designed to handle data frames Note that for large data sets this will take a long time, so by default this is only reapplied for the first 1000 columns
1 | subset_lab(x, ..., col_lim = 1000)
|
x |
A data frame or matrix. |
... |
Other arguments passed to subset. In particular, we give subset and select arguments here (see examples and subset help for more) |
col_lim |
A limit on the number of columns the attributes are applied to. |
The subsetted data set
1 2 3 4 5 6 7 8 9 10 | subset_lab(airquality, Temp > 80, select = c(Ozone, Temp))
subset_lab(airquality, Day == 1, select = -Temp)
subset_lab(airquality, select = Ozone:Wind)
## sometimes requiring a logical 'subset' argument is a nuisance
nm <- rownames(state.x77)
start_with_M <- nm %in% grep("^M", nm, value = TRUE)
subset_lab(state.x77, start_with_M, Illiteracy:Murder)
# but in recent versions of R this can simply be
subset_lab(state.x77, grepl("^M", nm), Illiteracy:Murder)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.