I created a type of object similar to a data frame. In some circumstances, It
needs special methods for [ and [- and rbind() (but not cbind()). Then I
found this in the cbind()/rbind() man page:
The method dispatching is _not_ done via 'UseMethod()', but by
C-internal dispatching.
Hum. Then, I need to be more accurate. My object is of class
c(bar, data.frame). So, by virtue of ...
The dispatch algorithm is described in the source file
('.../src/main/bind.c') as
1. For each argument we get the list of possible class
memberships from the class
Actually you can add your own method. See
library(zoo)
rbind.zoo
for an example.
On 9/27/06, Vincent Goulet [EMAIL PROTECTED] wrote:
I created a type of object similar to a data frame. In some circumstances, It
needs special methods for [ and [- and rbind() (but not cbind()). Then I
found
Maybe you could use rbind2, which has an S4 generic in the methods
package, instead?
# BOD is a data frame built into R
foo - structure(BOD, class = c(bar, data.frame))
setOldClass(bar)
setMethod(rbind2, signature(x = bar, y = bar),
function(x, y) {
cat(Hello!\n)