Skip to content

cbind is not generic as claimed, omits labels where S has them (PR#239)

1 message · Peter Dalgaard

#
Ross Ihaka <ihaka@stat.auckland.ac.nz> writes:
This is because there's no cbind.factor:

S> cbind.factor<-function(...) match.call()
S> cbind(x,y)
      x           y 
X1.10 1 numeric, 10
attr(, "names"):
[1] ""      "X1.10"
Warning messages:
1: Incompatible methods ("cbind.factor", "cbind.data.frame") for "cbind"
2: Number of rows of result is not a multiple of vector length (arg 1) in: cbin
	d(x, y)

(and cbind.data.frame just calls data.frame(...) so it's little wonder
that the result is always a data frame)