Learn R Programming

powerHaDeX (version 1.0)

add_noise_to_curves: Adds noise to deuteration curves

Description

This function makes noisy deuteration curves for power calculation purposes.

Usage

add_noise_to_curves(curves, per_run_deviations = NULL, relative = TRUE)

Arguments

curves

list of lists of deuteration curves returned by get_deuteration_curves_from_spectra.

per_run_deviations

optional, standard deviations of random noise that will be added to deuteration curves. Either a single number (then the error at each time point will be the same) or a vector of the same length as number of unique time points in the experiment. The error will be sampled from normal distribution with these standard deviations. Default NULL.

relative

logical, if TRUE (default), each deuteration curve will start at 0 (relative mass will be returned). Default TRUE.

Value

list of lists of data.tables

Details

This function uses add_noise_to_single_curve