Some the downstream uses of a FacileDataStore can throw problems when NA's
are found in data or covariates, so we often want to fill in NA's with
non-NA markers of missing values. Note that unless specified otherwise
(using the replace
and defaults
parameters),
freplace_na( data, replace = list(), defaults = list(), ignore = character(), ... )
data | the thing that has NA's in it (a data.frame or vector) |
---|---|
replace | a named list of elements to use for custom replacement values |
defaults | if named elements in |
an NA-replaced version of data
Depending on the atomic type of the thing that NA's are being replaced with,
a default value is assumed. These can be overriden by using the defaults
parameter, or specifically by column (or list) names via the replace
parameter.
Missing values (NA's) come up often in FacileDataStores since we often use them to include data from multiple datasets, which induces "ragged" (sparse) covariate (pData) entries. In man