search for: each_name

Displaying 1 result from an estimated 1 matches for "each_name".

2009 Apr 09
2
how to automatically select certain columns using for loop in dataframe
...Andrew 2 Barn 2 <NA> 2 Delta 3 3 Angus 3 Bolton 3 Cecil 3 <NA> 4 4 Alex 4 Bravo 4 Crayon 4 <NA> 5 5 Argo 5 <NA> 5 Corey 5 Dummy > Then for each col_names, I want to display the columns: for (each_name in col_names) { sub.data <- subset( all.data, !is.na( paste("NAME_", each_name, sep = '') ), select = c( paste("NUM_", each_name, sep = '') , paste("NAME_", each_name, sep = '')...