fetch_data {pmlbr} | R 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
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
[Package pmlbr version 0.2.1 Index]