help(package = "MASS") takes you to the INDEX file for the MASS package, which opens in a browser window (depending on your settings). To read this file in the console, we can use system.file() to get the file path, then readLines() to read it as a character vector.
## get the complete file path for the index file of the MASS package f <- system.file("INDEX", package = "MASS") ## read it readLines(f) # [1] "Functions:" # [2] "=========" # [3] "" # [4] "Null Null Spaces of Matrices" # [5] "addterm Try All One-Term Additions to a Model" # [6] "anova.negbin Likelihood Ratio Tests for Negative Binomial GLMs" # ... # ...
Or we can wrap it in cat() to get a cleaner version
cat(readLines(f), sep = "\n")
Alternatively, you can get the same result with
readLines(file.path(find.package("MASS"), "INDEX"))
Finally, if you are interested, links to the package description and news that appear at the top of the html browser can be obtained using
packageDescription("MASS") news(package = "MASS")
Rich scriven
source share