(Re-)read the discussion of indexing (both `[` and `[[`) and be sure to get 
clear on the difference between matrices and data frames in the Introduction to 
R document that comes with R. There are many ways to create numeric vectors, 
character vectors, and logical vectors that can then be used as indexes, 
including the straightforward way:

df[ c(
"Unique to strat          ",
"Unique to strat:crt.dummy                 ",
"Common to strat, and crt.dummy         ",
"Common to strat, and gender         ",
"Common to strat, and age                 ") ,]
-- 
Sent from my phone. Please excuse my brevity.

On October 19, 2017 3:14:53 AM PDT, Francesca PANCOTTO <f.panco...@unimore.it> 
wrote:
>Thanks a lot, so simple so efficient!
>
>I will study more the grep command I did not know.
>
>Thanks!
>
>
>Francesca Pancotto
>
>> Il giorno 19 ott 2017, alle ore 12:12, Enrico Schumann
><e...@enricoschumann.net> ha scritto:
>> 
>>  df[grep("strat", row.names(df)), ]
>
>
>       [[alternative HTML version deleted]]
>
>______________________________________________
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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.

Reply via email to