[R] New Variable from Several Existing Variables

2010-02-26 Thread wookie1976
I am new to R, but have been using SAS for years. In this transition period, I am finding myself pulling my hair out to do some of the simplest things. An example of this is that I need to generate a new variable based on the outcome of several existing variables in a data row. In other words,

Re: [R] First. Last. Data row selection

2010-02-23 Thread wookie1976
Steve, Your example seems to work quite well, except I get a summary printout showing all the true and false values. > !duplicated(ladata2$Vin) [1] TRUE TRUE TRUE TRUE What I would like to do is have the true/false values appended to a column at the end of my dataset so that when don

[R] First. Last. Data row selection

2010-02-23 Thread wookie1976
I am in the process of switching from SAS over to R. I am working on very large CSV datasets that contain vehicle information. As I am processing the data, I need to select the first (or sometimes the second) record (by date) for any records that have the same license plate number. In SAS, ther