setpreprocessor(classname, operation)
The user-defined S4 class definitions are stored in global environment and thus the function can not be used from an other package.
scaleexample <- function(dataobject) dataobject <- initializedataclassobject(data.frame(x=scale(dataobject@x), dataobject@y)) setpreprocessor("scaleexample", "scaleexample(dataobject)")