Learn R Programming

powerHaDeX (version 1.0)

add_noise: Adds noise to mass domain

Description

Adds noise to mass domain

Usage

add_noise(replicate_curve, standard_deviations)

Arguments

replicate_curve

`data.table` with technical replicates of a deuteration curve (one element of a list obtained by get_deuteration_curves_from_spectra)

standard_deviations

named vector of standard deviations

Value

`data.table` containing a single noisy curve (for one replication).

Details

The noise is sampled from normal distribution with mean 0 and standard deviation equal to per_run_deviations and added to the Mass values unless they are not zeroes (there is no noise at the time 0).