Conversion of missing values and 0s
missing_data.RdDepending on your experimental design, you may wish to treat intensity values
below the detection limit of your instrument as missing data (NA) or as a
value of 0 intensity. Though this can be done manually before importing data
into a DAList object, we also provide some simple utility functions to convert missing
values to 0 and vice-verse. missing_to_zero converts missing values (NA by default,
or other user-provided values) to 0, and zero_to_missing converts 0s to NA.
Usage
missing_to_zero(DAList, missing_values = c(NA))
zero_to_missing(DAList)Examples
if (FALSE) { # \dontrun{
# Convert missing values to 0s
# Default is to convert NAs to 0s
no_missing <- missing_to_zero(DAList)
# But can convert other numbers as well:
no_missing <- missing_to_zero(DAList, missing = c(NA, -1))
# Convert 0s to missing values
missing_as_zero <- zero_to_missing(DAList)
} # }