Hello, Hello,
I have a data frame (tot) with about 2000 columns. How can I extract from it all strings that start with E14? I tried this: e14 <- sapply(tot, function(x) grepl("^E14", x)) but this returns me just TRUE and FALSE vector, how do I get actual strings that start with E14? Thanks Ana ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.