"sun" <flyhyena at yahoo.com.cn> wrote in message news:fm7mtb$tqk$1 at ger.gmane.org... > Hi, > > I have a data frame df with column names a,b and c. sorry for some typos. should be subdf = df[df$a==1,] and subdf = df[df$a==1 && df$b ==2,]