- Copy the appropriate folder ("Linux", "Mac", "Windows") from the USB drive to your hard disk
- (Optional) The course requires use of the 'Development' version of R. If you are a Windows or Mac user and need a recent (last 7 days) R, then use the installer found in the folder just copied to your disk.
- (Optional) Windows users need to have a special set of development tools installed. Use the installer 'Rtools27.exe' to install these, if necessary.
- To install all packages on Windows, issue the R command
install.packages(repos="file:///<drive:/full/path/to/Windows>/repos/"Note the 'file:///' at the beginning, the need to include the drive (e.g, C:), and the '/' rather than '\' slashes. 'Windows' is the folder copied above. On linux or Mac try
install.packages(repos="file://<full/path/to/Linux>/repos/")see '?install.packages' for additional options
- Return here for additional instructions
Installing packages from source on Windows
Please be sure to have installed (double-clicked on) the 'Rtools27.exe' installer. At some point the installer asks if you would like to change the 'PATH', check the box and accept the default. This will likely result in a system restart.
Start a DOS window (e.g., Start --> Run end enter "cmd"). To install a package, execute
R CMD INSTALL --clean PKG.tar.gzwhere PKG is the name of the package you would like to install. If the DOS prompt says something like 'R is not a recognized program' then you'll need to specify the full path to the location where you installed R, e.g.,
c:/Users/Martin/Desktop/R/bin/R.exe CMD INSTALL --clean PKG.tar.gzIf there is a complaint about 'perl not found', then the installation of Rtools or the specification of the PATH was not correct.