mdload: Load a bundled dataset by slug

View source: R/data_store.R

mdloadR Documentation

Load a bundled dataset by slug

Description

Reads the table's CSV and applies the column names and classes from the bundled schema, so the result is the same typed data frame on every platform regardless of how read.csv() would have guessed. Every table also ships as a Parquet file holding the same typed frame; format = "parquet" reads that copy instead. The first load of a table is cached for the session; later calls return the cached copy unless refresh = TRUE. The cached copy is what the file held when it was checked; when mdverify() finds the file changed since, the cached copy is dropped, and the next load reads the file again and refuses it.

Usage

mdload(slug, refresh = FALSE, format = c("csv", "parquet"))

Arguments

slug

Dataset slug; see the slug column of mdcat().

refresh

Re-read the file, and check it against the signed manifest again, even if a cached copy exists.

format

"csv" (default) or "parquet": which shipped copy to read. Both give the same data frame, value for value: decimal text in the CSV is read as the nearest double, the same on every platform.

Value

A data frame.

Examples

d <- mdload("arsau_2023_uof_main_records")
str(d[, 1:4])

rmoriedata documentation built on Nov. 18, 2026, 5:06 p.m.