Skip to content
Back to formatted view

Raw Message

Message-ID: <1374585525.97733.YahooMailNeo@web160105.mail.bf1.yahoo.com>
Date: 2013-07-23T13:18:45Z
From: Fg Nu
Subject: cbind error with check.names

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.names =TRUE)
but I would like to understand why?cbind?throws an error.

I asked this question on SO here:
http://stackoverflow.com/questions/17810470/cbind-error-with-check-names
and user?Hong Ooi?confirmed my suspicion that cbind was passing check.names = FALSE regardless of my setting that option, even though the help file indicates that this should be possible,?

"For the "data.frame" method of cbind these can be further arguments to data.frame such as stringsAsFactors."

Is there some design principle that I am missing here?

Thanks.