Installing the CAR package.doc

advertisement
Installing the CAR package
The car package is a contributed package to R from the author of our book
John Fox. Some machines may not have car already installed. In that case,
here is how you can install the package on a PC:
1) Open R.
2) On the tool bar at the top of the page find “Packages”, and under the
pull-down menu choose “Install package(s)…”
3) Choose the CRAN mirror...”USA(IA)” and click OK.
4) Find and highlight the car package and click OK.
5) If it asks you to set-up a personal library for loading packages, click
YES.
6) To load the package for your present R session, type > library(car)
7) Check that it’s loaded by typing >?car
These steps worked in 41 Schaeffer Hall. If the car package is not listed
in the available packages list when you try these steps on your own machine, let me
know, and I’ll have to give some other instructions.
Setting the Working Directory on PC
I set the working directory on the PC using the following:
>getwd()
# To see where the present working directory is at.
[1] "C:/Program Files/R/R-2.5.1"
>setwd("C://Temp")
>getwd()
[1] "C:/Temp"
# To set it to the directory of my choice.
Download