Appendix: R Reference - R in a Nutshell
Pages: 1, 2, 3, 4, 5
MASS
This is the main package of Venables and Ripley'sMASS.
Functions
Data Sets
methods
This package contains formally defined methods and classesfor R objects, plus other programming tools.
Functions
mgcv
This package provides functions for generalized additivemodeling and generalized additive mixed modeling. The term GAM is takento include any GLM estimated by quadratically penalized (possiblyquasi-) likelihood maximization. For more information on this package, see the help file.
nlme
This package provides functions for linear and nonlinearmixed-effects models. See the help file for more information.
nnet
This package provides functions for feed-forward neuralnetworks and multinomial log-linear models.
Functions
| Function | Description |
|---|---|
| class.ind | Generates a class indicator function from a givenfactor. |
| multinom | Fits multinomial log-linear models via neuralnetworks. |
| nnet | Fits single-hidden-layer neural network, possibly withskip-layer connections. |
| nnetHess | Evaluates the Hessian (matrix of second derivatives) ofthe specified neural network. Normally called via argumentHess=TRUE to nnet or via vcov.multinom. |
| which.is.max | Finds the maximum position in a vector, breaking tiesat random. |
rpart
This package provides functions for recursive partitioningand regression trees.
Functions
| Function | Description |
|---|---|
| meanvar | Creates a plot on the current graphics device of thedeviance of the node divided by the number of observations atthe node. Also returns the node number. |
| na.rpart | Handles missing values in an rpart object. |
| path.rpart | Returns a names list, where each element contains thesplits on the path from the root to the selected nodes. |
| plotcp | Gives a visual representation of the cross-validationresults in an rpartobject. |
| post | Generates a PostScript presentation plot of an rpart object. |
| printcp | Displays the cptable for a fitted rpartobject. |
| prune | Determines a nested sequence of subtrees of thesupplied rpart object byrecursively snipping offthe least important splits, based on the complexity parameter(cp). |
| rpart | Fits an rpartmodel. |
| rpart.control | Various parameters that control aspects of the rpart fit. |
| rpconvert | Rpart objects changed (slightly) in their internalformat in order to accommodate the changes for user-writtensplit functions. This routine updates an old object to the newformat. |
| rsq.rpart | Produces two plots. The first plots ther-square (apparent and apparent − fromcross-validation) versus the number of splits. The secondplots the relative error(cross-validation) +/− 1 − SE fromcross-validation versus the number of splits. |
| snip.rpart | Creates a "snipped" rpart object, containing the nodesthat remain after selected subtrees have been snipped off. Theuser can snip nodes using the toss argument or interactivelyby clicking the mouse button on specified nodes within thegraphics window. |
| xpred.rpart | Gives the predicted values for an rpart fit, under cross-validation, for a set of complexity parameter values. |
Data Sets
spatial
This package provides functions for Kriging and pointpattern analysis.
Functions
| Function | Description |
|---|---|
| Kaver | Forms the average of a series of (usually simulated)K functions. |
| Kenvl | Computes envelope (upper and lower limits) and averageof simulations of K functions. |
| Kfn | Actually computes L = sqrt(K/pi). |
| Psim | Simulates binomial spatial point process. |
| SSI | Simulates SSI (sequential spatial inhibition) pointprocess. |
| Strauss | Simulates Strauss spatial point process. |
| anova.trls | Computes analysis of variance tables for one or morefitted trend surface model objects; where anova.trls is called with multipleobjects, it passes on the arguments to anovalist.trls. |
| anovalist.trls | Computes analysis of variance tables for one or morefitted trend surface model objects; where anova.trls is called with multipleobjects, it passes on the arguments to anovalist.trls. |
| correlogram | Computes spatial correlograms of spatial data orresiduals. |
| expcov | Spatial covariance function for use with surf.gls. |
| gaucov | Spatial covariance function for use with surf.gls. |
| plot.trls | Provides the basic quantities used in forming a varietyof diagnostics for checking the quality of regression fits for trendsurfaces calculated by surf.ls. |
| ppgetregion | Retrieves the rectangular domain (xl, xu) x (yl, yu) from the underlying Ccode. |
| ppinit | Reads a file in standard format and creates a pointprocess object. |
| pplik | Pseudolikelihood estimation of a Strauss spatial pointprocess. |
| ppregion | Sets the rectangular domain (xl, xu) x (yl, yu). |
| predict.trls | Predicted values based on trend surface modelobject. |
| prmat | Evaluates Kriging surface over a grid. |
| semat | Evaluates Kriging standard error of prediction over agrid. |
| sphercov | Spatial covariance function for use with surf.gls. |
| surf.gls | Fits a trend surface by generalized leastsquares. |
| surf.ls | Fits a trend surface by least squares. |
| trls.influence | Provides the basic quantities used in forming a varietyof diagnostics for checking the quality of regression fits fortrend surfaces calculated by surf.ls. |
| trmat | Evaluates trend surface over a grid. |
| variogram | Computes spatial (semi-)variogram of spatial data orresiduals. |
splines
This package provides functions for working withregression splines using the B-spline basis, bs, and the natural cubic spline basis, ns.
Functions
| Function | Description |
|---|---|
| as.polySpline | Creates the piecewise polynomial representation of aspline object. |
| asVector | This is a generic function. Methods for this functioncoerce objects of given classes to vectors. |
| backSpline | Creates a monotone inverse of a monotone naturalspline. |
| bs | Generates the B-spline basis matrix for a polynomialspline. |
| interpSpline | Creates an interpolation spline, either from x and y vectors or from aformula/data.frame combination. |
| ns | Generates the B-spline basis matrix for a natural cubicspline. |
| periodicSpline | Creates a periodic interpolation spline, either fromx and y vectors or from aformula/data.frame combination. |
| polySpline | Creates the piecewise polynomial representation of aspline object. |
| spline.des | Evaluates the design matrix for the B-splines definedby knots at the values inx. |
| splineDesign | Evaluates the design matrix for the B-splines definedby knots at the values inx. |
| splineKnots | Returns the knot vector corresponding to a splineobject. |
| splineOrder | Returns the order of a spline object. |
| xyVector | Creates an object to represent a set ofx-y pairs. |
