> Well, here's one way that "might" work (explanation below): > > The ideas is to turn each row into a character vector and then work with the > two character vectors. > >> bigs <- do.call(paste,TheBigOne) >> ix <- which(bigs %in% setdiff(bigs,do.call(paste,TheLittleOne))) >> TheBigOne[ix,] > > However, this may not work if the data frame contain calculated numeric > values which theoretically (infinite precision) are equal but are not > exactly due to finite precision. For example, try: > >> 0 %in% pi/2 > > If this is what you have, then you have to do something fancier working > directly with the numeric values.
That's basically what the plyr code does (except it converts it into integers) and is pretty efficient ;) Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.