data_save: Save data using dot notation or file path

View source: R/data_write.R

data_saveR Documentation

Save data using dot notation or file path

Description

Save data using dot notation or file path

Usage

data_save(
  data,
  path,
  type = NULL,
  delimiter = "comma",
  locked = TRUE,
  force = FALSE
)

Arguments

data

Data frame to save

path

Either:

  • Dot notation: inputs.raw.filename resolves to inputs/raw/filename.rds

  • Direct path: "inputs/raw/filename.csv" uses path as-is

Dot notation uses your configured directories (e.g., inputs.raw, inputs.intermediate, outputs.private).

type

Type of data file ("csv" or "rds"). Auto-detected from extension if path includes one.

delimiter

Delimiter for CSV files ("comma", "tab", "semicolon", "space")

locked

Whether the file should be locked after saving

force

If TRUE, creates missing directories. If FALSE (default), errors if directory doesn't exist.

Value

Invisibly returns the saved data.


framework documentation built on Feb. 18, 2026, 1:07 a.m.