On Thu, Jan 14, 2010 at 1:57 PM, Dennis Murphy <djmu...@gmail.com> wrote:
> Try this: > > nms <- paste("BOUTLENGTHTOT", 1:17, sep = "") > data[, nms] > On Thu, Jan 14, 2010 at 2:08 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote: > Try > > dat[names(dat) %in% paste("BOUTLENGTHTOT", 1:17, sep="")] > Thanks! Both methods worked. --Martin [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list 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.