handle_df_args: Handle function arguments passed in the form of a data.frame

handle_df_argsR Documentation

Handle function arguments passed in the form of a data.frame

Description

Handle function arguments passed in the form of a data.frame

Usage

handle_df_args(
  df,
  exclude = NULL,
  parent_fn = NULL,
  fuzzy_match = TRUE,
  fn_env = NULL,
  ...
)

Arguments

df

data.frame with colnames() that should be applied to function arguments defined by parent_fn; or a character filename that contains delimited data that can be coerced to a data.frame, for example a tab-delimited or comma-delimited text file.

parent_fn

function used to obtain the formals() to define function arguments.

...

additional arguments are ignored.

Details

This function is an internal utility function intended to allow funtion arguments to be passed as a single data.frame, and each of the colnames(df) represent formal function arguments.

One tricky aspect is how to handle arguments that only expect one value. It could be validated here, or that could be responsibility of the parent function.

Value

environment containing variables parsed from df

See Also

Other jam utility functions: cardinality(), color_complement(), convert_PD_df_to_SE(), convert_imputed_assays_to_na(), curate_se_colData(), curate_to_df_by_pattern(), design2layout(), get_numeric_transform(), merge_proteomics_se(), nmat_summary(), nmatlist_summary(), rmd_tab_iterator(), rowNormScale(), summit_from_vector()

Examples

parent_fn <- nmatlist2heatmaps;


jmw86069/platjam documentation built on Sept. 26, 2024, 3:31 p.m.