Functions for reading data from diverse sources into tidy
tidylearn_data objects. The main dispatcher
tl_read() auto-detects the format from the file
extension and routes to the appropriate reader.
All readers return a tidylearn_data object,
which is a tibble subclass carrying metadata about
the data source.
Details
Supported file formats:
CSV:
.csvfiles via readr (with base R fallback)TSV:
.tsvfiles via readr (with base R fallback)Excel:
.xls,.xlsx,.xlsmfiles via readxlParquet:
.parquetfiles via nanoparquetJSON:
.jsonfiles via jsonliteRDS:
.rdsfiles via basereadRDS()RData:
.rdata,.rdafiles via baseload()
Supported databases (via DBI):
SQLite:
.sqlite,.dbfiles via RSQLitePostgreSQL: via RPostgres
MySQL/MariaDB: via RMariaDB
BigQuery: via bigrquery
Supported cloud/API sources:
S3:
s3://URIs via paws.storageGitHub: raw file download from repositories
Kaggle: dataset download via Kaggle CLI
Multi-file reading:
Multiple paths: pass a character vector to
tl_read()Directories:
tl_read_dir()scans for data files with optional pattern/format filtering and recursive scanningZip archives:
tl_read_zip()extracts and reads from.zipfiles
When combining multiple files, a source_file column is added to
identify the origin of each row.
