[R] Counting non-missing values XXXX

R. Michael Weylandt <michael.weylandt@gmail.com> michael.weylandt at gmail.com
Sat Aug 27 22:49:53 CEST 2011


sum(!is.na(x))

Michael

On Aug 27, 2011, at 4:39 PM, Dan Abner <dan.abner99 at 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 at 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.



More information about the R-help mailing list