-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of David Winsemius
Sent: Wednesday, December 02, 2009 3:25 PM
To: Peng Yu
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] documentation of intersect() on string vector and num
Greg Snow wrote:
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
project.org] On Behalf Of David Winsemius
Sent: Wednesday, December 02, 2009 3:25 PM
To: Peng Yu
Cc: r-h...@stat.math.ethz.ch
Subject: Re: [R] documentation of intersect() on string vector
intersect(c(1,3,2),c('1','3'))
[1] 1 3
Apparently, intersect() treats num as string. But this is not
documented in the help. Could somebody add it in the future version of
R?
Also according to the help, the argument should not have duplicated
elements. But I tried the following example, it
intersect(c(1,3,2),c('1','3'))
[1] 1 3
Apparently, intersect() treats num as string. But this is not
documented in the help. Could somebody add it in the future version of
R?
This is more a general coercion feature. For example 1 == 1, see ?Comparison.
Also according to the help, the
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is
character
[1] 1 3
Apparently, intersect() treats num as string. But this is not
documented in the help. Could somebody add it in the future version of
R?
It is documented that intersect
It is documented that intersect will return a value of that is same
mode as its y argument. How could it be any more clear?
Oops, this makes my previous response to this question inaccurate, apologies.
__
R-help@r-project.org mailing list
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius dwinsem...@comcast.net wrote:
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is character
[1] 1 3
Apparently, intersect() treats num as string. But this is not
documented in the help.
On Dec 2, 2009, at 5:00 PM, Peng Yu wrote:
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius dwinsem...@comcast.net
wrote:
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is
character
[1] 1 3
Apparently, intersect() treats num as
Peng Yu wrote:
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius dwinsem...@comcast.net wrote:
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is character
[1] 1 3
Apparently, intersect() treats num as string. But this is not
documented
On Wed, Dec 2, 2009 at 5:36 PM, Peter Ehlers ehl...@ucalgary.ca wrote:
Peng Yu wrote:
On Wed, Dec 2, 2009 at 3:51 PM, David Winsemius dwinsem...@comcast.net
wrote:
On Dec 2, 2009, at 4:33 PM, Peng Yu wrote:
intersect(c(1,3,2),c('1','3')) # note x is numeric and y is character
[1] 1 3
10 matches
Mail list logo