I am working with a very wide data frame that consists of 100+ column names. I am looking to structure the search for data in each of these columns using the following code:
funfilter <- function(col) {
print(col)
output <- d$col[d$col != ""]
print(output)
}
for(i in 23:length(colnames(d))){
funfilter(colnames(d)[i])
}
This code produces an output variable that is NULL. Is there a better way to accomplish this? I would prefer to use R-base if possible.