setStage("average", "Average Numbers", intype = "numeric")
setProtocol("mean", fun = mean, parent = "average")
setProtocol("median", fun = median, parent = "average")
stage <- Stage("average")
stage
defaultMethod(stage)
defaultMethod(stage) <- "median"
defaultMethod(stage)
Run the code above in your browser using DataLab