Visualisation and Data
Friday, 17 October 2014
missing values...
Code from here:
http://www.statmethods.net/input/missingdata.html
x <- c(1,2,NA,3)
mean(x) # returns NA
mean(x, na.rm=TRUE) # returns 2
Key points is the:
na.rm=TRUE
Useful!
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment