View source: R/bounded_values.R
handle_NAs | R Documentation |
napredict
carefullyApply napredict
carefully
handle_NAs(x, na.index, na.act)
x |
a vector, data frame, or matrix to be adjusted based upon the missing value information. |
na.index |
An object that has a length greater than 0 if |
na.act |
An object produced by a
|
napredict
x <- c(3, NA, 2, NA, 4)
# Compare
cumsum(x)
x2 <- stats::na.exclude(x)
handle_NAs(cumsum(x2), anyNA(x), attr(x2, "na.action"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.