| mcnode_na_rm | R Documentation |
Replaces NA and infinite values in mcnode objects with a specified value.
mcnode_na_rm(mcnode, na_value = 0)
mcnode |
An mcnode object containing NA or infinite values |
na_value |
Numeric value to replace NA and infinite values (default = 0) |
An mcnode object with NA and infinite values replaced by na_value
is.na.mcnode
sample_mcnode <- mcstoc(runif,
min = mcdata(c(NA, 0.2, -Inf), type = "0", nvariates = 3),
max = mcdata(c(NA, 0.3, Inf), type = "0", nvariates = 3),
nvariates = 3
)
# Replace NA and Inf with 0
clean_mcnode <- mcnode_na_rm(sample_mcnode)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.