mydata2 has numeric data in columns id X1:X140 Y
cat("id ",sum(is.na(mydata2$id)),"\n") # OK cat("Y ",sum(is.na(mydata2$Y)),"\n") # OK
define function fun to work on columns, and in particular on the X columns
fun <- sum(is.na(mydata2$X)) apply(mydata2$X,2,fun)
Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'fun' of mode 'function' was not found
Can anyone give some insight? It is sensitive data so I am not sending code. Thanks.