Skip to content
Prev 66711 / 398525 Next

From FAQ 7.21 to a command like apply(sapply(list(f1, f2, f3), is.na), 2, sum)

On Wed, 30 Mar 2005, Heinz Tuechler wrote:

            
No parse,as.name or other complications needed. It's all just indexing. 
Suppose your data frame is called dd

fs<-paste('f',1:3,sep='')
apply(sapply(dd[,fs],is.na),2,sum)
summary(dd[,fs])

 	-thomas