Skip to content
Prev 181892 / 398513 Next

Odd Behavior Out of setdiff(...) - addition of duplicate entries is not identified

But I get:

#omitted initial line which would have create an object only to be  
overwritten.

 > Test1_DF<-data.frame(HouseSize=c(1:100), LandLocation=c("Here"),  
Price = c("Low"))
 > Test2_DF<-rbind(Test1_DF, Test1_DF)
 > setdiff(Test1_DF, Test2_DF)
     HouseSize LandLocation Price
1           1         Here   Low
2           2         Here   Low
3           3         Here   Low
4           4         Here   Low
5           5         Here   Low
.... snipped additional 95 rows.

Furthermore I did not load any library (nor did your indicate what  
packages you have loaded), and there does not seem to be a  
setdiff.data.frame in my workspace:
 > setdiff.data.frame
Error: object "setdiff.data.frame" not found

 > sessionInfo()
R version 2.8.1 Patched (2009-01-19 r47650)
i386-apple-darwin9.6.0

locale:
en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats4    splines   stats     graphics  grDevices utils      
datasets  methods   base

other attached packages:
[1] MASS_7.2-46       reshape_0.8.2     plyr_0.1.5         
modeltools_0.2-16 mvtnorm_0.9-4
[6] survival_2.35-4

loaded via a namespace (and not attached):
[1] coin_1.0-1
On May 29, 2009, at 5:58 PM, Jason Rupert wrote:

            
David Winsemius, MD
Heritage Laboratories
West Hartford, CT