Re: [R] How would i sum the number of NA's in multiple vectors

2013-10-17 Thread Joshua Wiley
Or faster (both computational speed and amount of code): colSums(is.na(rbind(c1, c2, c3))) On Thu, Oct 17, 2013 at 4:34 AM, Carl Witthoft wrote: > mattbju2013 wrote > > Hi guys this is my first post, i need help summing the number of NA's in > a > > few vectors > > > > for example.. > > > > c1

Re: [R] How would i sum the number of NA's in multiple vectors

2013-10-17 Thread Carl Witthoft
mattbju2013 wrote > Hi guys this is my first post, i need help summing the number of NA's in a > few vectors > > for example.. > > c1<-c(1,2,NA,3,4) > c2<-c(NA,1,2,3,4) > c3<-c(NA,1,2,3,4) > > how would i get a result that only sums the number of NA's in the vector? > the.result.i.want<-c(2,0,1,