I doubt it.
1. The OP failed to specify how "populatedness" is defined. Is it
NULL, NA, "", " ",...?
2. What is percent() ? Is this the OP's function or one from a package
or pseudocode or ... ?
3. lapply(df,function)
is generally preferable in R to:
for(name in colnames(df)) function(df[ ,name
Hi
Try
for (cname in colnames(mydf))
print((percent(length(is.null(mydf [, cname]) / lines))
Br. Frede
Oprindelig meddelelse
Fra: Jeff Johnson
Dato:18/01/2014 02.10 (GMT+01:00)
Til: R help
Emne: [R] For loop on column names
I'm trying to find a more efficient to calculate t
2 matches
Mail list logo