Skip to content
Prev 46276 / 63461 Next

cbind error with check.names

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
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.