[R] Selecting several columns/rows of a dataframe?

qinstat at gmail.com qinstat at gmail.com
Wed May 1 22:42:10 CEST 2013

try tb[c('name1','name3'), c('col1','col5')]

Hong Qin

Sent from my iPad

On May 1, 2013, at 4:04 PM, Joel Prokopchuk <joelproko at gmail.com> wrote:

> Sorry, the use of rows/columns I found so far was rather
> contradictive, both refering to what can be gotten via subset()
> instead of what I'm looking for.
> Is there a way to get multiple colums/rows? Something like
> corpus.df${mph,mgl,eng}
> Thanks in advance for any answers.
> --
> Joel Prokopchuk
> ______________________________________________
> R-help at 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.

More information about the R-help mailing list