is this the output you require
mydata<-read.table(text=' Group ,Year, Height
1.0 ,2004-2005, 27
1.0 ,2005-2006, 32600
2.0 ,2005-2006, 520
1.0 ,2006-2007, 216
2.0 ,2006-2007, 39059
1.0 ,2006-2007, 428
1.0 ,2007-2008, 10624
2.0 ,2007-2008, 30391
3.0 ,2007-2008, 7450
4.0 ,2007-2008, 234
1.0 ,2008-2009, 2487
2.0 ,2008-2009, 170
3.0 ,2008-2009, 2606
4.0 ,2008-2009, 519
5.0 ,2008-2009, 54857
1.0 ,2009-2010, 2272
2.0 ,2009-2010, 3592
3.0 ,2009-2010, 4792
4.0 ,2009-2010, 75292
5.0 ,2009-2010, 7555
6.0 ,2009-2010, 9185
2.0 ,2010-2011, 2073
3.0 ,2010-2011, 582
4.0 ,2010-2011, 6248
5.0 ,2010-2011, 215
6.0 ,2010-2011, 9153
7.0 ,2010-2011, 3831
3.5 , 2011, 5560
4.5 , 2011, 1396',header=TRUE,sep=",",stringsAsFactors=FALSE)
# NOT operation is common among the conditions
logical= ( !( mydata$Group %in% c(1,2) | grepl('2011',mydata$Year) ) )
mydata_wk<-mydata[logical,]
> mydata_wk
Group Year Height
9 3 2007-2008 7450
10 4 2007-2008 234
13 3 2008-2009 2606
14 4 2008-2009 519
15 5 2008-2009 54857
18 3 2009-2010 4792
19 4 2009-2010 75292
20 5 2009-2010 7555
21 6 2009-2010 9185
> str(mydata_wk)
'data.frame': 9 obs. of 3 variables:
$ Group : num 3 4 3 4 5 3 4 5 6
$ Year : chr "2007-2008" "2007-2008" "2008-2009" "2008-2009" ...
$ Height: int 7450 234 2606 519 54857 4792 75292 7555 9185