Learn R Programming

IFC (version 0.1.1)

cpp_cleanse: Matrix Cleanser

Description

Replaces values in matrix mat according to mask msk. Depending of add_noise parameter values will be replaced with noise or not.

Arguments

mat

a NumericMatrix.

msk

a IntegerMatrix.

add_noise

logical, if true adds normal noise. Rcpp::Rf_rnorm(bg, sd) function is used. Default is true.

bg

double, mean value of the background added if add_noise is true. Default is 0.0

sd

double, standard deviation of the background added if add_noise is true. Default is 0.0

Value

a NumericMatrix with replaced according to msk.