On Tue, Jun 2, 2009 at 1:18 PM, William Dunlap wrote:
> %in% is a thin wrapper on a call to match().
Yes, as I mentioned in my email, all this is clearly documented in ? match.
> match() is not a generic function (and is not documented to be one),
> so it treats data.frames as lists, as their
Barry Rowlingson wrote:
[...]
> I suspect it's using 'deparse()' to get the character representation.
> This function is mentioned in ?as.character, but as.character.default
> disappears into the infernal .Internal and I don't have time to chase
> source code - it's sunny outside!
>
on the si
> > ...
> > The related functions, duplicated() and unique(), do have
> > row-wise data.frame methods. E.g.,
> >> duplicated(data.frame(x=c(1,2,2,3,3),y=letters[c(1,1,2,2,2)]))
> >[1] FALSE FALSE FALSE FALSE TRUE
> > Perhaps match() ought to have one also. S+'s match is generic
> > and
William Dunlap wrote:
> %in% is a thin wrapper on a call to match(). match() is
> not a generic function (and is not documented to be one),
> so it treats data.frames as lists, as their underlying
> representation is a list of columns. match is documented
> to convert lists to character and to th
On Tue, Jun 2, 2009 at 4:13 PM, Stavros Macrakis wrote:
> but simply treats the data frame as a *character* list:
>
> 1 %in% data.frame(a=2,b=1) # TRUE
> '1' %in% data.frame(a=2,b=1) # TRUE
> 1 %in% data.frame(a=2:3,b=1:2) # FALSE
> 1:3 %in% data.frame(a=2:4,b=1:3) # FALSE FALS
- Spotfire Division
wdunlap tibco.com
> -Original Message-
> From: r-devel-boun...@r-project.org
> [mailto:r-devel-boun...@r-project.org] On Behalf Of Wacek Kusnierczyk
> Sent: Tuesday, June 02, 2009 9:11 AM
> To: Stavros Macrakis
> Cc: r-devel@r-project.org; dwinsem...@comcast.net
&
Stavros Macrakis wrote:
>
> '1:3' %in% data.frame(a=2:4,b=1:3) # TRUE
>
utterly weird. so what would x have to be so that
x %in% data.frame('a')
# TRUE
hint:
'1' %in% data.frame(1)
# TRUE
vQ
__
R-devel@r-project.org mailin
On Sat, May 30, 2009 at 11:59 AM, Stavros Macrakis wrote:
> Since R is object-oriented, data frame set operations should be the natural
> operations for their class. There are, I suppose, two natural ways: the
> column-wise (variable-wise) and the row-wise (observation-wise) one. The
> row-wise
Jay,
I really appreciate all your help help.
I posted to Nabble an R file and input CSV files more accurately demonstrating
what I am seeing and the output I desire to achieve when I difference two
dataframes.
http://n2.nabble.com/Support-SetDiff-Discussion-Items...-td2999739.html
It m
Dear Stavros,
On Sat, May 30, 2009 at 11:59 AM, Stavros Macrakis
wrote:
> The current implementation is column-wise...
Thanks for pointing that out, and solving the mystery for me. :-)
Jay
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/m
Since R is object-oriented, data frame set operations should be the natural
operations for their class. There are, I suppose, two natural ways: the
column-wise (variable-wise) and the row-wise (observation-wise) one. The
row-wise one seems more natural and more useful to me.
The current implemen
On Sat, May 30, 2009 at 8:50 AM, Stavros Macrakis 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
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).
13 matches
Mail list logo