From gkerns at ysu.edu  Sat May 30 16:21:20 2009
From: gkerns at ysu.edu (G. Jay Kerns)
Date: Sat, 30 May 2009 10:21:20 -0400
Subject: [Rd] setdiff bizarre (was: odd behavior out of setdiff)
In-Reply-To: <8b356f880905300550y39c76b02h2d908b1c6b0ef0e4@mail.gmail.com>
References: <a695148b0905292135g1c1bee38xb70687a43ccaa934@mail.gmail.com> 
	<8b356f880905300550y39c76b02h2d908b1c6b0ef0e4@mail.gmail.com>
Message-ID: <a695148b0905300721x6e291e0bg66fefcf0931f2ce2@mail.gmail.com>

On Sat, May 30, 2009 at 8:50 AM, Stavros Macrakis <macrakis at alum.mit.edu> wrote:
> It seems to me that, abstractly, a dataframe is just as
> straightforwardly a sequence of tuples/observations as a vector is a
> sequence of scalars. R's convention is that a 1-vector represents a
> scalar, and similarly, a 1-dataframe can represent a tuple (though it
> can also be represented as a list). Of course, a dataframe can *also*
> be interpreted as a list of vectors.
>
> Just as a sequence of scalars can be interpreted as a set of scalars
> by the order- and repetition-ignoring homomophism, so can a sequence
> of tuples. It seems to me natural that set operations should follow
> that interpretation.
>
> ? ? ? ? ?-s


After a good night's sleep, the documentation says clearly that
setdiff() operates on two vectors (of the same mode), so my message
would be an example of "garbage in, garbage out".

It would be nice if there were an error thrown, but surely there are
more mission critical problems than this one.

Thanks anyway.
Jay



[Rd] setdiff bizarre (was: odd behavior out of setdiff)
G. Jay Kerns