group_stats.RdCompute stats for samples grouped by one or more annotations
group_stats(
data_df,
value_cols = NULL,
anno,
grouping,
stat = c("median", "mean", "tmean", "prop_gt0", "prop_gt1", "prop_gt_cutoff", "min",
"max"),
cutoff = NULL
)a data.frame with sample_name and expression values
The values to use for computation. If NULL (default), will select all columns in data_df except sample_name.
a data.frame with sample_name and sample annotations
one or more column names of anno to use for sample grouping
Which statistic to compute for grouped samples.
options are:
"median"
"mean"
"tmean" (25% trimmed mean)
"nzmean" (mean of non-zero values)
"nzmedian" (median of non-zero values)
"prop_gt0" (proportion of samples > 0)
"prop_gt1" (proportion of samples > 1)
"prop_gt_cutoff" (proportion of samples > cutoff)
"min"
"max"
A cutoff for use in stats calculations. Most ignore this value. Default is 0.
group_stats(melt_df, value_cols = NULL, anno, grouping = "mouse_line", stat = "mean")
#> Error in group_stats(melt_df, value_cols = NULL, anno, grouping = "mouse_line", stat = "mean"): object 'melt_df' not found