Learn R Programming

margins (version 0.2.0)

build_datalist: Build list of data.frames

Description

Construct a list of data.frames based upon an input data.frame and a list of one or more at values

Usage

build_datalist(data, at = NULL, atmeans = FALSE, ...)

Arguments

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 data. See examples.

atmeans

A logical indicating whether, after replacing values in at, to return one-row data.frames containing variable means.

Ignored.

Value

A list of data.frames.

See Also

margins

Examples

Run this code
# NOT RUN {
# 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(1,2,3)))))

# }

Run the code above in your browser using DataLab