Skip to contents

Processes a dataframe to generate summaries for numeric, factor, character, binary, date, and other data types. Supports year-based summaries and group-specific outcomes. Will handle cases where certain column types are not present in the dataset.

Usage

parse_function(
  parse_df,
  suffix_term = "",
  ind_outcomes = c(""),
  group_col = NULL,
  add_years = FALSE
)

Arguments

parse_df

Dataframe. Input dataframe to parse and analyze.

suffix_term

Character. Suffix to append to parsed column names (default: "").

ind_outcomes

Character vector. Individual outcomes for parsing and group-specific summaries (default: "").

group_col

Character. Column name representing the grouping variable (default: NULL).

add_years

Logical. Include year-based summaries in the output (default: FALSE).

Value

A list of dataframes summarizing the input dataset. Only includes summaries for column types that are present in the input data:

date_df

Summaries for date columns (if present).

binary_df

Summaries for binary columns (if present).

char_df

Summaries for character columns (if present).

factor_df

Summaries for factor columns (if present).

summary_numeric

Summaries for numeric columns (if present).

group_df

Summaries by group for specified outcomes (if applicable).