[R] First. Last. Data row selection

wookie1976 joe.roeschen at revecorp.com
Wed Feb 24 01:08:26 CET 2010


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 done, I can selectively either keep or
drop rows based on whether they are true or false.  I have tried to get this
done with several variable creation statements with no luck.  Any ideas on
how I can modify your code to get the following:

Plate, Date, True.False
Plate1, 013110, true
Plate 1, 010110, false
Plate 1, 010109, false
Plate 2, 020110, true

To everyone else, thanks greatly for your examples!  I have learned from
each of your suggestions.

-- 
View this message in context: http://n4.nabble.com/First-Last-Data-row-selection-tp1566260p1566801.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list