fetch_data: fetch_data function

View source: R/pmlb.R

fetch_dataR Documentation

fetch_data function

Description

Download a data set from the PMLB repository, (optionally) store it locally, and return the data set. You must be connected to the internet if you are fetching a data set that is not cached locally.

Usage

fetch_data(
  dataset_name,
  return_X_y = FALSE,
  local_cache_dir = NA,
  dropna = TRUE
)

Arguments

dataset_name

The name of the data set to load from PMLB

return_X_y

Boolean. Whether to return the data with the features and labels stored in separate data structures or a single structure (can be TRUE or FALSE, defaults to FALSE)

local_cache_dir

The directory on your local machine to store the data files in (defaults to NA, indicating cache will not be used)

dropna

Boolean. Whether rows with NAs should be automatically dropped. Default to TRUE.

See Also

summary_stats.

Examples

# Features and labels in single data frame
penguins <- fetch_data("penguins")
head(penguins)

# Features and labels stored in separate data structures
penguins <- fetch_data("penguins", return_X_y = TRUE)
penguins$x # data frame
penguins$y # vector

pmlbr documentation built on Sept. 29, 2023, 1:06 a.m.