View source: R/collapse_df_reps.R
collapse_df_reps | R Documentation |
collapse columns in df which share an identity index provided in the vector pid
collapse_df_reps(
df,
pid,
method = c("min", "mean", "clean", "cor"),
clean_thresh = 2.5,
ignore_cols = NULL,
show_progress = TRUE
)
df |
data frame or tibble with observations as columns |
pid |
patient id, character vector with length equal to number of columns in df. replicate columns are indicated by same value in corresponding elements of pid |
method |
what kind of collapsing to do. min = take minimum value. mean = take mean of values. clean = take mean, but if either value is below clean_thresh, set final valut o zero. cor: compute correlation across all features for data. required duplicates. |
clean_thresh |
for method="clean". threshold value below which if any replicate exhibits this value, set output to 0 |
ignore_cols |
columns in df to exclude from colapse (e.g. feature id) |
show_progress |
logical indicating whether or not to show progress bar |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.