my_summ_stat_func: Summary statistics of multiples variables

View source: R/my_summ_stat_func.R

my_summ_stat_funcR Documentation

Summary statistics of multiples variables

Description

Compute the summary statistics of numeric variables from a given dataset. Compute the mean, sd, sem, median, n_Waves, n_Cells, n_Animals and Normality_Shapiro_p. NOTE: Shapiro-Wilk test will fail if less than 2 samples!.

Usage

my_summ_stat_func(
  my_dataset,
  my_grouping_vars = c("Animal", "Treatment", "Condition"),
  Na_rm = TRUE,
  round_to = 2,
  shapiro = "yes"
)

Arguments

my_dataset

A previously cleaned dataframe with the function clean_and_tidy_df_func().

my_grouping_vars

Character vector. A character vector of groups names assigned to perform the aggregation. Don't change at least you know what you are doing!

Na_rm

Boolean. Shall Nas be removed for summary functions computation?. Default to TRUE.

round_to

Integer. A value to indicate number of decimals to used in final output. Default to 2.

shapiro

Character. asses shapiro wilk test for normality. Requiere dataset length bigger than 2, otherwise will raise a warning.

Value

Return a dataframe with the mean, median, SD, SEM, number of elements analized (cells or wave), number of animals, and asses Normality of the distribution with the Shapiro-Wilk test.

Examples

# the example is missing

rjlopez2/AnlysisOfWaves documentation built on Sept. 15, 2022, 2:25 p.m.