Installing packages in R

Installing packages in R

Like indicated in the introduction of the tutorial, R is a open source software package. This makes it free for everyone to develop different applications that could be applied to the R console. Such a application is called a package. Examples of packages are:
  • Zelig: To make more sophisticated calculations for a regression analysis;
  • Foreign: Installation of this package will make R able to read more types of files.
When you have downloaded R, no additional packages are installed. In the first place this is not a problem since you could perform quite good data analysis with R without additional packages installed. For example, the calculations in this tutorial do not require additional packages. 

If you want to install packages in the R console, you can do this as follows:
Enter the command available.packages(). If you press enter, a window appears where you have to choose a mirror. Select a mirror that mostly fits your location. 

If you have done this, a list of packages appears that are ready for installation. If you have found a package, copy the name of that package and past this in the following command: install.packages('*name of the package that you want to install*'). By pressing Enter the package gets installed and R indicates in which folder this package is located.

Installing packages in R
Installing packages in R

No comments:

Post a Comment