dot-process_and_write: Process and Write a File

.process_and_writeR Documentation

Process and Write a File

Description

Process and Write a File

Usage

.process_and_write(
  source_path,
  target_path,
  process_f,
  process_args,
  write_f,
  write_args
)

Arguments

source_path

Character scalar; the path to the raw file. Paths starting with http://, https://, ftp://, or ftps:// will be downloaded to a temp file if the processed version is not already available.

target_path

Character scalar; the path where the processed version of the file should be stored.

process_f

A function or one-sided formula to use to process the source file. source_path will be passed as the first argument to this function. Defaults to read_f.

process_args

An optional list of additional arguments to process_f.

write_f

A function or one-sided formula to use to save the processed file. The processed object will be passed as the first argument to this function, and target_path will be passed as the second argument. Defaults to base::saveRDS().

write_args

An optional list of additional arguments to write_f.

Value

The processed object.


macmillancontentscience/dlr documentation built on Sept. 24, 2022, 12:50 p.m.