data_load
Load a data file into an R session for use by other statistical tools. Supports CSV, Excel, SPSS, Stata, SAS, RDS, RData, JSON, and Parquet, returning dimensions and column summaries.
Instructions
Load a data file into the session under a name. Supports CSV, TSV, Excel (.xlsx/.xls), SPSS (.sav), Stata (.dta), SAS (.sas7bdat), RDS, RData, JSON and Parquet; the format is detected from the extension. Returns the dimensions and a per-column summary of types, missing values and example values. The dataset is then available to every other tool as data="<name>".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sep | No | Field separator for delimited text, e.g. ';' or '\t'. | |
| name | No | Name to give the dataset in the R session. | df |
| path | Yes | Path to the file. `~` is expanded. | |
| skip | No | Rows to skip before the header. | |
| sheet | No | Excel sheet name or number. | |
| format | No | Override the detected format: csv, tsv, delim, excel, spss, stata, sas, rds, rdata, json, parquet. | |
| header | No | Whether the first row holds column names. | |
| encoding | No | File encoding, e.g. UTF-8, latin1, big5. | UTF-8 |
| max_rows | No | Read at most this many rows. | |
| na_strings | No | Strings to treat as missing. | |
| labels_to_factor | No | For SPSS/Stata, convert labelled numeric columns into factors. |