Description Usage Arguments Value Methods (by class) Grouped data frames (dplyr package) Warning
Calculate baseline signal and subtract it from all observations.
1 2 3 4 5 6 7 |
x |
a |
variables |
character vector of variables (columns) to modify |
reference |
logical predicate that identifies reference observations, given as string or bare;
will be passed to |
method |
method with which to compute the baseline, mean or median; given as symbol or string |
by_group |
character vector of variables to group by ( |
a data.frame
with modified variables
data.frame
: computes mean/median of desired variables with vapply
and subtracts them from their respective variables using mapply
grouped_df
: see data.frame__to__grouped_df
dplyr
package)The method for class grouped_df
is home brewed as I don't know
how to properly handle this class.
Be careful when defining references observations. If a group ends up without reference,
the procedure will crash. reference
should not make use of a grouping variable.
It is safest to create a separate viariable for the purpose of reference
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.