Hi, Not sure if the following is what you look for: >x <- c(1:10, NA, 12:20) >sum(x[!is.na(x)])
-- View this message in context: http://r.789695.n4.nabble.com/Sum-function-and-missing-values-need-to-mimic-SAS-sum-function-tp4702344p4702392.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ [email protected] mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

