[R] Subsetting without partial matches

2009-01-31 Thread Jonathan Dushoff
David: Thank you for your very valuable response. In fact, I was trying to _avoid_ partial matching, not accomplish it. Subset is a _much_ better way of doing what I was trying to do. Humorously, however, your code also reproduces the mistake that brought me here, AFAICT. I think my code

Re: [R] Subsetting without partial matches

2009-01-30 Thread David Winsemius
I have not seen you describe the value of doing partial matching in this application, so pardon this perhaps non-responsive reply: Wouldn't it have been much, much simpler to have used the subset function (which returns a dataframe object) at the first assignment to donotprint? Something

[R] Subsetting without partial matches

2009-01-30 Thread Jonathan Dushoff
I have a list of observations of individuals. I would like to make a list of individuals, with a data frame of observations for each individual. The following code usually works, but not always -- # Make a list of empty data