Hi all, 

I have a data frame df and I want to do subset based on several conditions of 
letters of the names in Command.1)if the names contain PD 2)if the names 
contain t1 3)if the names contain t2 4)if the names contain t1 and PD 5)if the 
names contain t2 and PD 6)otherwise the names would be unknown. I don't know 
how to use grep for all these conditions. 
 
   'data.frame': 36919 obs. of 162 variables
   $TE                :int 38,41,11,52,48,75,.....
   $Command           :factor W/2229 levels 
"_localize_PD","_localize_tre_t2","_localize_t1_seq",...
 
 
Thanks for any help

______________________________________________
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