Re: [R] Drop values of one dataframe based on the value of another

2012-06-01 Thread Ethan Brown
Before using ddply, try adding an id variable to uniquely identify each record (this is a good data integrity practice anyway). Then you can simply create the new data frame by using all the ids that aren't in your 'To_remove' subset. Here's the code for your example: library(plyr) library(outlie

[R] Drop values of one dataframe based on the value of another

2012-06-01 Thread Sam Albers
Hello all, Let me first say that this isn't a question about outliers. I am using the outlier function from the outliers package but I am using it only because it is a convenient wrapper to determine values that have the largest difference between itself and the sample mean. Where I am running int