Tutorial by Examples

Packages are collections of R functions, data, and compiled code in a well-defined format. Public (and private) repositories are used to host collections of R packages. The largest collection of R packages is available from CRAN. Using CRAN A package can be installed from CRAN using following code...
To install package from local source file: install.packages(path_to_source, repos = NULL, type="source") install.packages("~/Downloads/dplyr-master.zip", repos=NULL, type="source") Here, path_to_source is absolute path of local source file. Another command that ...
To install packages directly from GitHub use the devtools package: library(devtools) install_github("authorName/repositoryName") To install ggplot2 from github: devtools::install_github("tidyverse/ggplot2") The above command will install the version of ggplot2 that corre...
pacman is a simple package manager for R. pacman allows a user to compactly load all desired packages, installing any which are missing (and their dependencies), with a single command, p_load. pacman does not require the user to type quotation marks around a package name. Basic usage is as follows:...
While working on the development of an R package it is often necessary to install the latest version of the package. This can be achieved by first building a source distribution of the package (on the command line) R CMD build my_package and then installing it in R. Any running R sessions with p...

Page 1 of 1