Let's construct a rbind.myclass() function that just emits an echo upon invocation.
"Hello from rbind.myclass," function(...) rbind.myclass
After creating an object of the class myclass, the subsequent rbind calls are all appropriately sent.
myclass()
a <- "abc"
myclass = class(a)
rbind (a, a)
rbind (a, "d")
rbind (a, 1)
list(), rbind(a),
matrix(), rbind(a),
Rbind() will call base::rbind.data.frame() in its place if one of the arguments (which need not be the first one) is one of the following:
(a, data.frame())
Although this behaviour is a little unexpected, rbind's dispatch section explicitly documents it (). There, it is suggested that:
It might be essential to convert other items to data frames first if you wish to mix them with data frames.