View source: R/build_datalist.R
build_datalist | R Documentation |
Construct a list of data.frames based upon an input data.frame and a list of one or more at
values
build_datalist(data, at = NULL, as.data.frame = FALSE, ...)
data |
A data.frame containing the original data. |
at |
A list of one or more named vectors of values, which will be used to specify values of variables in |
as.data.frame |
A logical indicating whether to return a single stacked data frame rather than a list of data frames |
... |
Ignored. |
A list of data.frames, unless as.data.frame = TRUE
in which case a single, stacked data frame is returned.
Thomas J. Leeper
find_data
, mean_or_mode
, seq_range
# basic examples
require("datasets")
build_datalist(head(mtcars), at = list(cyl = c(4, 6)))
str(build_datalist(head(mtcars), at = list(cyl = c(4,6), wt = c(2.75,3,3.25))), 1)
str(build_datalist(head(mtcars), at = data.frame(cyl = c(4,4), wt = c(2.75,3))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.