Skip to content
Prev 325456 / 398503 Next

Creating subset using selected columns

Hello,

You could try something like the following.
The example below assumes your data.frame is named 'dat'


cnums <- grep("Peak\\.Area", colnames(dat))
subdat <- dat[cnums]

See ?regexp for the regular expressions used by ?grep.

Hope this helps,

Rui Barradas

Em 16-06-2013 08:20, Suparna Mitra escreveu: