[R] How to extract data.frame columns using regex?

Peng Yu pengyu.ut at gmail.com
Thu Sep 17 05:03:43 CEST 2009


Hi,

data.frame(x1=1:11,x2=2:12,x3=3:13,y=4:14)

I want to extract all the columns that with the name 'x?'. Is there a
general way to do this in R?

Regards,
Peng




More information about the R-help mailing list