. . . a love story between theory and practice . . .
Search This Blog
R: Installing, Loading, and Detaching Packages
To install a package in R, the function to be used is install.packages. Let say we want to install the ggplot2 package, simply code this with the following:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To install more than one package, utilize the concatenate function, c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note that in executing the above codes, a dialogue box will pop up asking for the CRAN-Mirror, just choose the one that's in or near your country. Now to load these packages, run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters