handleNA {distantia} | R Documentation |
This function is used internally by prepareSequences
. Handles empty and NA data in a multivariate time-series in two possible ways: 1) deleting rows with NA or empty cases; 2) replacing NA data with zeros.
handleNA(
sequence = NULL,
if.empty.cases = "zero"
)
sequence |
Dataframe, a multivariate time-series. |
if.empty.cases |
character, one of: "omit" (default), "zero". When "omit", the function removes every row with at least one empty/NA record. When "zero", empty/NA data is replaced with zeros. |
A dataframe with the same columns as sequence
.
Blas Benito <blasbenito@gmail.com>
data(sequenceB)
B.sequence <- handleNA(
sequence = sequenceB,
if.empty.cases = "zero"
)