From fgnu32 at yahoo.com  Tue Jul 23 19:47:39 2013
From: fgnu32 at yahoo.com (Fg Nu)
Date: Tue, 23 Jul 2013 10:47:39 -0700 (PDT)
Subject: [Rd] cbind error with check.names
In-Reply-To: <CA+vqiLHmAC2n-5kUTS+J09O8BzEvikLEyK+v2i3Kv3ffGGn2KA@mail.gmail.com>
References: <1374585525.97733.YahooMailNeo@web160105.mail.bf1.yahoo.com>
	<CA+vqiLGkncU6QZm0CqBs+PbbXzFuGnzWvOOfrVqN9mUc4kttpQ@mail.gmail.com>
	<1374598453.74044.YahooMailNeo@web160105.mail.bf1.yahoo.com>
	<CA+vqiLHmAC2n-5kUTS+J09O8BzEvikLEyK+v2i3Kv3ffGGn2KA@mail.gmail.com>
Message-ID: <1374601659.38463.YahooMailNeo@web160105.mail.bf1.yahoo.com>



> 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 same argument more than once. There
are exceptions to this, e.g.,

sum(c(NA, 1:10), na.rm=TRUE, na.rm=FALSE)

but in general each argument can only be matched once. Since
cbind.data.frame calls data.frame with check.names=FALSE, you can't
supply it again.

Best,
Ista

>
> Thanks
>



Yikes, no. As I mentioned to the SO poster, I get that bit.

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.



[Rd] cbind error with check.names
Fg Nu