beanumber / openWAR

An R package enabling the computation of openWAR using MLBAM data
99 stars 33 forks source link

fix generics #84

Closed beanumber closed 9 years ago

beanumber commented 9 years ago

From @rpruim:

Just glancing through your shakeWAR.R file I see some stuff that I think you should fix sooner rather than later.

return(shakeWAR.openWARPlays(data$openWAR,
N,
resample,
…))

You should never make a call to shakeWAR.openWARPlays(). The call should be to shakeWAR() and method dispatch should do the right thing if data$openWAR is an openWARPlays object. If it is not, then you shouldn’t be using this function anyway. I think you should get a warning from CRAN checks about this.

beanumber commented 9 years ago
@method
 shakeWAR openWARPlays

If you have a any sort of recent version of roxygen2, this should not be necessary. I’m trying to figure out why things did not work for you without it. See http://r-pkgs.had.co.nz/man.html#man-classes