[R] Subscripting

GL pflugg at shands.ufl.edu
Wed Feb 10 20:26:29 CET 2010


Dataframe1 contains a list of specific dates. Dataframe2 contains a large
dataset, one element of which is Date. How do I create a subset of
Dataframe2 that excludes the dates from Dataframe1? I know how to do it with
a left outer join vs null in SQL, but I can't figure out how to do it more
directly via the subcripts that already exist? 

Dateframe1

Date
1/1/2010
1/18/2010


Dataframe2

Date Attribute Count
1/1/2010 Red 5
1/15/2010 Green 2
1/18/2010 Purple 8
1/19/2010 Yellow 3

ResultingDataframe (Dataframe2 minus the rows that have Dates in Dataframe1)

Date Attribute Count
1/15/2010 Green 2
1/19/2010 Yellow 3

-- 
View this message in context: http://n4.nabble.com/Subscripting-tp1476330p1476330.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list