Supposed your data.frame is called x, try
x[ which( substr( colnames( x ), 1, 4 ) == "Peak" ) ]
On Sunday 16 June 2013 15:20:37 Suparna Mitra wrote:
> Hello R experts,
> I need a help to create a subset file. I know with subset comand, its very
> easy to select many different columns, or thresho
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 Mitr
2 matches
Mail list logo