combine_repeats: Function to combine repeated measures

Description Usage Arguments Value Author(s) See Also

View source: R/rep.combine_repeats.R

Description

Merge repeated measures by taking one representative value (e.g. average) of them. It assumes the measurements were conducted in separate binder batches (or assays), so that the data are stored in different columns of baf. If repeated measurements were conducted in a same binder batch, transform the data using transform_to_landscape_for_repeats.

Usage

1
2
3
4
5
6
7
8
9
combine_repeats(
  baf,
  rep_binder,
  rm_grp_rep_binder = T,
  center = T,
  scale = F,
  FUN = function(x) mean(x, na.rm = T),
  ...
)

Arguments

baf

an object of the BAf-class

rep_binder

a factor (or a vector) that indicates which binders were repeated, so their values should be combined.

rm_grp_rep_binder

if the 'grp' and 'rep_binder' columns in @binder that were added by transform_to_landscape_for_repeats, they should be removed.

center, scale

if the difference between assays should be adjusted using scale

FUN

the function to compute a reference value such as mean and median

...

not used

Value

A BAf-class in which the two observed values were replaced with the representative value computed by the FUN.

Author(s)

Mun-Gwan Hong <mun-gwan.hong@scilifelab.se>

See Also

transform_to_landscape_for_repeats


Rundmus/BAf-R_package documentation built on May 18, 2020, 12:59 p.m.