Accessing Built-in Datasets in R
Premium
R comes with many built-in datasets which are quite useful while learning R. To begin learning the basics of data visualization in R, we will make use of some of these datasets.
Datasets in the 'datasets' package
Many datasets are included in a package called datasets
which is distributed with R so these datasets are instantly available to you for use. For example, two datasets namely cars
and pressure
are included in this default datasets package. So, you can access their data by using functions such as head(cars)
, summary(cars)
, etc.
Unlock Premium Content
Upgrade your account to access the full article, downloads, and exercises.
You'll get access to:
- Access complete tutorials and examples
- Download source code and resources
- Follow along with practical exercises
- Get in-depth explanations