Skip to contents

This is the workhorse for the enframe_ family of functions. enframe_general() evaluates a specified distributional representation for multiple distributions, and places the results in a data frame or tibble.

Usage

enframe_general(..., at, arg_name, fn_prefix, sep, eval_fn, fn_args = list())

Arguments

at

Vector of values to evaluate the cdf at. Must be named when using in enframe_.

arg_name

For enframe_, name of the column containing the function arguments.

fn_prefix

For enframe_, name of the function to appear in the column(s).

sep

When enframe'ing more than one distribution, the character that will be separating the fn_name and the distribution name.

eval_fn

Name of the eval_ function for the desired distributional representation, such as eval_cdf and eval_density.

fn_args

A named list of arguments to pass to the eval_fn function, besides the distribution and at argument (the strict argument being the most common, and perhaps the only use case).

Value

A data frame or tibble of the input argument (at), with the evaluated distributional representation for each distribution in ... in its own column.

Details

If only one distribution is specified in ..., then the evaluation column will be named that of fn_prefix.

If more than one distribution is specified in ..., the evaluation columns will be named by the prefix fn_prefix followed by the distribution names, with sep in between.

Distributions are named first by their argument names, if given, or if not, the input text. Names are then made unique using vctrs::vec_as_names() with the "unique" names repair. "Unique" is chosen instead of "universal" because names are anticipated to be syntactic with the eval_fn prefix; "minimal" is not sufficient because it may result in columns having the same names.