Back
Close

Computing with Data

elgeish
33.4K views
Previous: Executing Shell Commands Next: Scope

Installing Packages

R features easy installation of both core R and third party packages:

# install package ggplot2
install.packages("ggplot2")
# install package from a particular mirror site
install.packages("ggplot2", repos = "http://cran.r-project.org")
# install a package from source, rather than binary
install.packages("ggplot2", type = "source")
library(ggplot2)  # bring package into scope
# display all datasets in the package ggplot2
data(package = "ggplot2")
installed.packages()  # display a list of installed packages
update.packages()  # update currently installed packages
Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants