deleteNA {ttrTests} | R Documentation |
Used in this package to create data for long, short, or neutral days only. Could have many other applications. Probably exists in other packages with more support.
deleteNA(x)
x |
A univariate series or vector |
As long as x can be indexed, it should work fine.
Outputs is a vector of length <= length(x) with NA entries deleted
David St John
x <- c(1,NA,2,3,NA,4) deleteNA(x) t <- c(1,2,3) x <- c(t[1],t[2],t[3],t[4],t[5]) deleteNA(x)