Here is an example where cbind fails with an error when check.names=TRUE is set.
data(airquality)
airQualityBind =cbind(airquality,airquality,check.names =TRUE)
I understand that cbind is a call to data.frame and the following works:
airQualityBind =data.frame(airquality,airquality,check.name
- Original Message -
From: Ista Zahn
To: Fg Nu
Cc: "r-devel@r-project.org"
Sent: Tuesday, July 23, 2013 9:50 PM
Subject: Re: [Rd] cbind error with check.names
On Tue, Jul 23, 2013 at 9:18 AM, Fg Nu wrote:
>
>
>
> Here is an example where cbind fails with an
- Original Message -
From: Ista Zahn
To: Fg Nu
Cc: "r-devel@r-project.org"
Sent: Tuesday, July 23, 2013 11:05 PM
Subject: Re: [Rd] cbind error with check.names
On Tue, Jul 23, 2013 at 12:54 PM, Fg Nu wrote:
>
>
>
> - Original Message -
> From: Ist
> Is there then a reason that overriding the check.names default is forbidden
> from cbind? I can't tell why this would be the case.
For the same reason you can't have
data.frame(x=1:10, x=11:20, check.names=TRUE, check.names=FALSE)
or
mean(x=1:10, x=11:20)
i.e, you can't generally pass the
>> I meant what is the design principle behind check.names being hardcoded to
> FALSE.
>> I see no conflict with the purpose of cbind from the ability to specify
> check.names
>> at the level of cbind.
> Perhaps data.frame() should throw an error if there are duplicate names,
> or perhap
I came across the distinction between the name of an object and the name of the
class that it belongs to in an oblique way again today, which made me question
my acceptance that it would be natural for them to differ.
I asked a question on SO here:
http://stackoverflow.com/questions/20762559/
t; x = matrix(1:10, nrow=2)
>> x
> [,1] [,2] [,3] [,4] [,5]
>[1,] 1 3 5 7 9
>[2,] 2 4 6 8 10
>> typeof(x)
>[1] "integer"
>
>
>HTH,
>~G
>
>
>
>
>On Tue, Dec 24, 2013 at 12:26 PM, Fg Nu wrote:
>
>
>
gt;I'm not a core developer of R, and so I don't speak for them, but the
>likelihood of that changes seems vanishingly small at this juncture. Whether
>it "should" work the way you describe is debatable (I am not convinced
>myself), but regardless of whether it should
you describe is debatable (I am not convinced
>>myself), but regardless of whether it should it almost surely isn't going to.
>>
>>~G
>>
>>
>>
>>
>>On Tue, Dec 24, 2013 at 1:57 PM, Fg Nu wrote:
>>
>>
>>>
>>>Gabrie