Displaying 1 result from an estimated 1 matches for "tytul".
Did you mean:
tytus
2009 May 18
1
S4 method dispatch and namespaces: why is default method selected
...quot;)
exportClasses("myclass")
exportMethods("plot")
things stop working (this is from package test):
> f <- system.file(file.path("pictures", "logo.ppm"), package="pixmap")
> o <- new("myclass", a=read.pnm(f), title="tytul")
> plot(o)
Error in as.double(y) :
cannot coerce type 'S4' to vector of type 'double'
Calls: plot ... plot -> .local -> plot -> plot.default -> xy.coords
Execution halted
So apparently calling 'plot' dispatches the default method instead of using th...