Re: [R] Question about setdiff()

2014-06-03 Thread Σταῦρος Μακράκης
There are two kinds of set difference: the usual set difference , also called the asymmetric difference or relative complement, and the symmetric difference . In R, setdiff(a,b) is

Re: [R] Question about setdiff()

2014-06-02 Thread arun
Hi, Please check this link: http://r.789695.n4.nabble.com/meaning-of-asymmetric-on-help-page-for-intersect-td877408.html union(setdiff(v,w), setdiff(w,v)) #or in this case setdiff(union(v,w),intersect(v,w)) #or  setdiff(c(v,w),c(v,w)[duplicated(c(v,w))]) A.K. .pae...@gmail.com> wrote: Hello

Re: [R] Question about setdiff()

2014-06-02 Thread Raphael Päbst
Thanks everyone! It is just as I expected, I just didn't understand how setdiff() works. Raphael On 6/2/14, Pascal Oettli wrote: > Hello, > > From the help page: "Performs *set* union, intersection, (asymmetric!) > difference, equality and membership on two vectors." > > Hope this helps, > Pasca

Re: [R] Question about setdiff()

2014-06-02 Thread Pascal Oettli
Hello, >From the help page: "Performs *set* union, intersection, (asymmetric!) difference, equality and membership on two vectors." Hope this helps, Pascal On Mon, Jun 2, 2014 at 3:57 PM, Raphael Päbst wrote: > Hello everyone, I have a question which is probably rooted in my lack > of understa

Re: [R] Question about setdiff()

2014-06-02 Thread Jeff Newmiller
About time for you to adjust your expectations... looks right to me from both a mathematical sense and as the functions are designed. --- Jeff NewmillerThe . . Go Live... DCN:

[R] Question about setdiff()

2014-06-01 Thread Raphael Päbst
Hello everyone, I have a question which is probably rooted in my lack of understanding when it comes to math. I just did the following: v <- c(1:20) w <- c(11:30) setdiff(v, w) and got: 1 2 3 4 5 6 7 8 9 10 Then I did the following: setdiff(w, v) and got, not surprisingly: 21 22 23 24 25 26 27