How to tell CRAN to install package dependencies automatically?

On your own system, try install.packages(“foo”, dependencies=…) with the dependencies= argument is documented as dependencies: logical indicating to also install uninstalled packages which these packages depend on/link to/import/suggest (and so on recursively). Not used if ‘repos = NULL’. Can also be a character vector, a subset of ‘c(“Depends”, “Imports”, “LinkingTo”, “Suggests”, “Enhances”)’. Only supported if … Read more

Set default CRAN mirror permanent in R

You can set repos in your .Rprofile to restore your choice every time you start R Edit: to be more precise: Add options(repos=structure(c(CRAN=”YOUR FAVORITE MIRROR”))) to your .Rprofile Alternatively, you can set the mirror site-wide in your Rprofile.site. The location of the file is given by ?Startup: The path of this file is taken from … Read more

R help page as object

Edited with suggestion of Hadley You can do this a bit easier by: getHTMLhelp <- function(…){ thefile <- help(…) capture.output( tools:::Rd2HTML(utils:::.getHelpFile(thefile)) ) } Using tools:::Rd2txt instead of tools:::Rd2HTML will give you plain text. Just getting the file (without any parsing) gives you the original Rd format, so you can write your custom parsing function to … Read more

How to select a CRAN mirror in R

You should either get a window with a list of repositories or a text menu with some options. But if that is not appearing, you can always specify the mirror from where to download the packages yourself by using repos parameter. By doing that, R will not ask you anymore about the repository. Example: install.packages(‘RMySQL’, … Read more