clean_stats_results: Statistics cleaning

View source: R/stats.R

clean_stats_resultsR Documentation

Statistics cleaning

Description

Uses regexp to remove unnecessary columns from statistics results data frame. Can also rename columns effectively.

Usage

clean_stats_results(
  df,
  remove = c("Intercept", "CI95", "Std_error", "t_value", "z_value", "R2"),
  rename = NULL,
  summary = TRUE,
  p_limit = 0.05,
  fdr = TRUE
)

Arguments

df

data frame, statistics results

remove

list, should contain strings that are matching to unwanted columns

rename

named list, names should contain matches that are replaced with values

summary

logical, should summary columns be added

p_limit

numeric, limit for p-values to be counted

fdr

logical, should summary be done with fdr-fixed values

Examples

# Simple manipulation to linear model results
lm_results <- perform_lm(drop_qcs(example_set), formula_char = "Feature ~ Group + Time")
lm_results <- clean_stats_results(lm_results,
  rename = c("GroupB" = "GroupB_vs_A", "Time2" = "Time2_vs_1")
)


antonvsdata/notame documentation built on Sept. 14, 2024, 11:09 p.m.