load_from_url: Load any rds/csv/csv.gz/parquet/qs file from a remote URL

View source: R/from_url.R

load_from_urlR Documentation

Load any rds/csv/csv.gz/parquet/qs file from a remote URL

Description

Load any rds/csv/csv.gz/parquet/qs file from a remote URL

Usage

load_from_url(url, ..., seasons = TRUE, nflverse = FALSE)

Arguments

url

a vector of URLs to load into memory. If more than one URL provided, will row-bind them.

...

named arguments that will be added as attributes to the data, e.g. nflverse_type = "pbp"

seasons

a numeric vector of years that will be used to filter the dataframe's season column. If TRUE (default), does not filter.

nflverse

TRUE to add nflverse_data classing and attributes.

Value

a dataframe, possibly of type nflverse_data

Examples



try({ # prevents cran errors
  urls <- c("https://github.com/nflverse/nflverse-data/releases/download/rosters/roster_2020.csv",
            "https://github.com/nflverse/nflverse-data/releases/download/rosters/roster_2021.csv")
 load_from_url(urls, nflverse = TRUE, nflverse_type = "rosters for 2020 & 2021")
})


nflreadr documentation built on Sept. 8, 2023, 5:57 p.m.