sum(!is.na(x)) Michael
On Aug 27, 2011, at 4:39 PM, Dan Abner <dan.abne...@gmail.com> wrote: > Hello everyone, > > What is the most elegant and efficient way to count non-missing values of a > vector? > > Thanks! > > Dan > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@r-project.org mailing list > 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. ______________________________________________ R-help@r-project.org mailing list 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.