parse_call {summarytools} | R Documentation |
Extract Data Information From Arguments Passed to Functions (internal)
Description
Using sys.calls(), sys.frames() and match.call(), this utility function extracts and/or infers information about the data being processed. Data frame name, variable names and labels if any, subsetting information, grouping information (when by() is used) are returned by the function which tries various methods to get this information.
Usage
parse_call(
mc,
var = "x",
df_name = TRUE,
df_label = TRUE,
var_name = TRUE,
var_label = TRUE,
caller = "",
silent = TRUE
)
Arguments
var |
Character. “x” (default) or “y” (the latter
being used only in |
df_name |
Logical. |
df_label |
Logical. |
var_name |
Logical. |
var_label |
Logical. |
silent |
Logical. Hide console messages. |
Value
A list consisting of one or many of the following items
df_name The data frame name
df_label The data frame label
var_name The variable name(s)
var_label The variable label
by_var The variable used in
by()
, when in the call stackby_group The group, when
by()
was usedby_first Binary indicator used when
by()
is in the call stackby_last Binary indicator
Author(s)
Dominic Comtois, dominic.comtois@gmail.com