Enframe a distributional representation
enframe_general.Rd
This is the workhorse for the enframe_
family of functions.
enframe_general()
evaluates a specified distributional representation
for multiple distributions / copulas, and places the results in a data frame
or tibble.
Usage
enframe_general(..., u, v, fn_prefix, sep, eval_fn, fn_args = list())
Arguments
- ...
Copulas to evaluate
- u, v
Vectors of values to evaluate the copula at.
- fn_prefix
For
enframe_
, name of the function to appear in the column(s).- sep
When
enframe
'ing more than one copula, the character that will be separating thefn_name
and the copula name.- eval_fn
Name of the
eval_
function for the desired distributional representation, such aseval_cdf
andeval_density
.- fn_args
A named list of arguments to pass to the
eval_fn
function, besides the copula andu
,v
arguments (thestrict
argument being the most common, and perhaps the only use case).
Value
A data frame or tibble of the input arguments (u
, v
), with the
evaluated distributional representation for each copula in
...
in its own column.
Details
If only one copula is specified in ...
, then the evaluation
column will be named that of fn_prefix
.
If more than one copula
is specified in ...
, the evaluation columns will be named by the
prefix fn_prefix
followed by the copula names, with sep
in between.
Copulas 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.