我是傻子,还是methods(class="foo")
你想要的(对于 S3 方法)???
methods(class="lm")
## [1] add1.lm* alias.lm* anova.lm case.names.lm*
## [5] confint.lm* cooks.distance.lm* deviance.lm* dfbeta.lm*
## [9] dfbetas.lm* drop1.lm* dummy.coef.lm* effects.lm*
## [13] extractAIC.lm* family.lm* formula.lm* hatvalues.lm
## [17] influence.lm* kappa.lm labels.lm* logLik.lm*
## [21] model.frame.lm model.matrix.lm nobs.lm* plot.lm
## [25] predict.lm print.lm proj.lm* qr.lm*
## [29] residuals.lm rstandard.lm rstudent.lm simulate.lm*
## [33] summary.lm variable.names.lm* vcov.lm*
##
## Non-visible functions are asterisked
showMethods
适用于 S4 课程(取自 @JoshO'Brien 现已删除的答案,供参考):
library(sp)
showMethods(classes="SpatialPolygons")
## Function: [ (package base)
## x="SpatialPolygons"
##
## Function: addAttrToGeom (package sp)
## x="SpatialPolygons", y="data.frame"
##
## Function: coerce (package methods)
## from="GridTopology", to="SpatialPolygons"
## from="SpatialGrid", to="SpatialPolygons"
## from="SpatialPixels", to="SpatialPolygons"
## from="SpatialPolygons", to="SpatialLines"
## from="SpatialPolygons", to="SpatialPolygonsDataFrame"
##
## Function: coordinates (package sp)
## obj="SpatialPolygons"
##
## Function: coordnames (package sp)
## x="SpatialPolygons"
##
## Function: coordnames<- (package sp)
## x="SpatialPolygons", value="character"
##
## Function: over (package sp)
## x="SpatialGrid", y="SpatialPolygons"
## x="SpatialPoints", y="SpatialPolygons"
## x="SpatialPolygons", y="SpatialGrid"
## x="SpatialPolygons", y="SpatialGridDataFrame"
## x="SpatialPolygons", y="SpatialPoints"
## x="SpatialPolygons", y="SpatialPointsDataFrame"
##
## Function: overlay (package sp)
## x="SpatialGridDataFrame", y="SpatialPolygons"
## x="SpatialGrid", y="SpatialPolygons"
## x="SpatialPointsDataFrame", y="SpatialPolygons"
## x="SpatialPoints", y="SpatialPolygons"
## x="SpatialPolygons", y="SpatialGrid"
## x="SpatialPolygons", y="SpatialPoints"
##
## Function: plot (package graphics)
## x="SpatialPolygons", y="missing"
##
## Function: polygons (package sp)
## obj="SpatialPolygons"
##
## Function: polygons<- (package sp)
## object="data.frame", value="SpatialPolygons"
##
## Function: recenter (package sp)
## obj="SpatialPolygons"
##
## Function: spChFIDs (package sp)
## obj="SpatialPolygons", x="character"
##
## Function: spsample (package sp)
## x="SpatialPolygons"