3.1 Installing from CRAN
For an official release, the package must be part of CRAN: the Comprehensive R Archive Network.CRAN is a website that collects and hosts all the material R needs, such as the various distributions, packages and more. The main advantage of being official is that it means the package has been through a review process. This ensures that the package is free of major bugs, has README and NEWS files, and has a unique version number. In addition, packages that have been officially released often have accompanying articles in The R Journal or The Journal of Statistical Software that provide detailed explanations of the code, examples, etc.
To install official packages, we can use the install.packages' command or the **Packages** tab in RStudio. If we run
install.packages(“package”, dependencies=TRUE), we will also install any other packages a package depends on. Finally, to update, we can either go to the **Packages** tab in RStudio and click the **Update** button. We can also type
update.packages()` in the Console for the same result. Try to update your package often to avoid unnecessary bugs and problems.