rddata {Rdatasets}R Documentation

Download and Read Datasets from Rdatasets

Description

Downloads a dataset from the Rdatasets archive and returns it as a data frame.

https://vincentarelbundock.github.io/Rdatasets/

Usage

rddata(dataset, package = NULL)

Arguments

dataset

String. Name of the dataset to download from the Rdatasets archive. Use rdsearch() to search available datasets.

package

String. Package name that originally published the data. If NULL, the function will attempt to automatically detect the package by searching for an exact match in the Rdatasets index.

Details

If the nanoparquet package is installed, rddata() will use the Parquet format, which is faster and uses less bandwidth to download. If nanoparquet is not available, the function automatically falls back to CSV format using base R functionality.

Value

A data frame containing the dataset. The columns and rows vary based on the dataset.

Global Options

The following global options control package behavior:

Examples

dat <- rddata("Titanic", "Stat2Data")
head(dat)

[Package Rdatasets version 0.0.1 Index]