This function finds all values of x in the e_data element of omicsData and replaces them with y
edata_replace(omicsData, x, y, threshold = NULL)
an object of the class 'pepData', 'proData', 'metabData',
'lipidData', or 'nmrData' created by as.pepData
,
as.proData
, as.metabData
,
as.lipidData
, or as.nmrData
, respectively.
value to be replaced, usually numeric or NA
replacement value, usually numeric or NA
Positive numeric value. Observed values below this threshold will be replaced by `y` (in addition to all `x` values).
data object of the same class as omicsData
This function is often used to replace any 0 values in peptide, protein, metabolite, or lipid data with NA's. For omicsData on the abundance scale, when the omicsData object is created, any 0's in e_data are automatically converted to NA's. For omicsData on the count scale (e.g. seqData objects), when the omicsData object is created, any NA's in e_data are automatically converted to 0's.
library(pmartRdata)
mymetab <- edata_replace(omicsData = metab_object, x = 0, y = NA)