Hello, I'm trying to subset a dataframe where I have many observation taken in different years. I would like to subset the dataframe (in this example called "table") to get a new dataframe containing only the observation of year 1995, 1998 and 2000. I've tried to use subset and the or operator "|" like this: subset(table, year==1995|1998|2000)-->table2 but the dataframe didn't subset and I get an object called table2 that is identical to table. I guess I'm doing something wrong!!
Thank in advance for any suggestions! Laura ______________________________________________ R-help@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.