Short answer: there is a default method used here which returns a matrix. It's
defined at the C-level for speed so you don't see it with methods()
Longer: cbind() isn't a regular S3 generic since it has no UseMethod(). Look at
WRE and R-Internals (internal generics) for more info.
Best (and go
## Hi, I'm having trouble understanding how the cbind function decides what
method to apply to its arguments. Easy cut and paste code below.
>
>
>
> ## create two columns
> c1 <- c("A","A","B","B")
> c2 <- 1:4
>
> ## cbind outputs a matrix with elements that are characters, seems
reasonable
2 matches
Mail list logo