Are some datasets bundled as packages?

Hello,

I am a beginner in R. I recently learned about datasets and packages and this question came across my mind when I was practicing data analysis through an online book (https://moderndive.com/1-getting-started.html). This book uses a package "nycflights13". On first instance, it seems to be a package, however this package also has a dataset that one can use to begin with analysis.
How do I exactly interpret this? Is it a package or a dataset?

This is a good reference: http://r-pkgs.had.co.nz/intro.html

Basically, packages are sharing of code, so can contain collections of functions, data, documentation etc. They aren't restricted to just functions or just data.

Hope that helps

2 Likes