I am trying to update a call for a new function I developed with a new class. The developing is pretty similar to linmod
found in Leish's article "Creating R packages".
Inside the function, the call is stored with match.call()
.
When I try to update the call, as follows:
library(MASS)
fit <- linmod(Hwt~Bwt*Sex, data=cats)
update(fit, subset = -1)
I got the following error message:
Error in eval(expr, envir, enclos) : could not find function "linmod.formula"
The problem seems to be that match.call()
saves the full S3 method name (linmod.formula
), instead of just the generic function name (linmod
), which would work perfectly.
Anyone could help me how to solve this problem?