powered by
dropNA returns the vector 'x', without elements that are NA or NaN or, if 'inf' is TRUE, equal to Inf or -Inf. replaceNA replaces these values by values from the second argument
dropNA
replaceNA
dropNA(x, inf = TRUE) replaceNA(x, na, inf = TRUE)
For dropNA: Vector containing the 'real' values of 'x' only
For replaceNA: Vector with 'non-real' values replaced by the respective elements of na.
na
vector from which the non-real values should be dropped or replaced
replacement or vector from which the replacing values are taken.
logical: should 'Inf' and '-Inf' be considered "non-real"?
Werner A. Stahel
na.omit, sumNA, ifelse
dd <- c(1, NA, 0/0, 4, -1/0, 6) dropNA(dd) na.omit(dd) replaceNA(dd, 99) replaceNA(dd, 100+1:6)
Run the code above in your browser using DataLab