R Datasets


Are you looking for some data to practice your R skills with? Try typing data() in the RStudio console.

When you install the tidyverse package you get additional datasets to work with. Starwars is one of those extra datasets. Tidyverse is highly recommended by the sources I see on the Internet. To install tidyverse in RStudio, type install.packages(“tidyverse”) and run that.

View(starwars). Starwars is an easy dataset to work with mainly because the columns are easy to understand.

Exploring a Dataset

gapminder.

Data Frames

Wherever data comes from, you will almost always want to store it in a data frame object to work with it.

There are three common sources of data in R.

  • A package with data that can be accessed by loading that package
  • An external file like a spreadsheet or CSV that can be imported into R
  • Data that has been generated from scratch using R code

Leave a Reply