Contents of Libraries

It is easy to use the help function to discover the contents of library packages. Here is how you find out about the contents of the spatial library:

library(help=spatial)
            Information on package "spatial"
Package:     spatial
Description:    Functions for kriging and point pattern analysis.

followed by a list of all the functions and data sets. You can view the full list of the contents of a library using objects with search() like this. Here are the contents of the spatial library:

objects(grep("spatial",search()))
 [1]     "anova.trls"   "anovalist.trls"   "correlogram"     "expcov"
 [5]     "gaucov"       "Kaver"            "Kenvl"           "Kfn"
 [9]     "plot.trls"    "ppgetregion"      "ppinit"          "pplik"
[13]     "ppregion"     "predict.trls"     "prmat"           "Psim"
[17]      "semat"     "sphercov"     "SSI" "Strauss"
[21]     "surf.gls"     "surf.ls"          "trls.influence"  "trmat"
[25]     "variogram"

Then, to find out how to use, say, Ripley's K (Kfn), just type

?Kfn

Get The R Book now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.