[R] setdiff for data.frames?

G. Jay Kerns gkerns at ysu.edu
Fri Mar 13 00:23:26 CET 2009


Dear Jason,

On Thu, Mar 12, 2009 at 6:11 PM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
> Try this:
>
> library(sqldf)
> BODsub <- BOD[1:3,]
> sqldf("select * from BOD except select * from BODsub")
>
> For more see: http://sqldf.googlecode.com
>

Also, please see

http://finzi.psych.upenn.edu/R/R-devel/archive/26683.html

and as a consequence of that discussion:

library(prob)
setdiff(A,B)

Best,
Jay





***************************************************
G. Jay Kerns, Ph.D.
Associate Professor
Department of Mathematics & Statistics
Youngstown State University
Youngstown, OH 44555-0002 USA
Office: 1035 Cushwa Hall
Phone: (330) 941-3310 Office (voice mail)
-3302 Department
-3170 FAX
E-mail: gkerns at ysu.edu
http://www.cc.ysu.edu/~gjkerns/




More information about the R-help mailing list