Supported formats include delimited text, ARFF, Parquet, Excel, Stata, FASTA, and RDS. Format-specific backends and options are listed in ?read. Tabular supervised input requires numeric or factor columns; categorical labels can be converted explicitly to factors before training.
5.2 Read from a URL
read() and ingest() accept an http:// or https:// URL. The file is downloaded to a temporary directory, read like a local file, and deleted. The file extension in the URL path selects the reader.
dat <-read("https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv")
The content behind a URL can change between downloads. ingest() records the URL, the time of the download, and the SHA-256 of the file in its manifest, together with a fingerprint of the data read, and writes a Parquet file that later steps read in place of the URL.
5.3 Read a Hugging Face dataset
An hf://datasets/<owner>/<name>/<file> path reads a file from a public dataset on the Hugging Face Hub, in the path form that huggingface_hub, DuckDB, and polars also read. A path that names the repository only reads its one data file.
dat <-read("hf://datasets/rtemis/tcga-pancan-hiseq")
@<revision> after the dataset name selects a branch, tag, or commit, and main applies when none is given. The revision is resolved to a commit, the file is downloaded at that commit, and its size and hash are checked against the Hub’s listing. ingest() records the path pinned to that commit, so a later run reads the same file:
2026-10-26 02:22:59 ▶ Reading file3dd3ea4b542.csv using data.table...
2026-10-26 02:22:59 Read in 150 x 52026-10-26 02:22:59 Converting 1 character feature to a factor... [preprocess_data]2026-10-26 02:22:59 Preprocessing done. [preprocess_data]2026-10-26 02:22:59 Done in 0.02 seconds.
2026-10-26 02:22:59 ▶ Ingested file3dd3ea4b542.csv to file3dd32dc89ff6.parquet [ingest]
Ingestion configurations select a reader and record column conversion, column-name cleaning, and duplicate handling. The columns argument carries explicit column type declarations. Format-specific constructors include setup_ParquetIngest(), setup_RDSIngest(), setup_XLSXIngest(), setup_DTAIngest(), and setup_ARFFIngest().
Preserve the input file, its data dictionary, and the ingestion manifest alongside the analysis. Continue with data checks.