.process_and_write {dlr}R 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://, http://, http://, or http:// 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 saveRDS.

write_args

An optional list of additional arguments to write_f.

Value

The processed object.


[Package dlr version 1.0.1 Index]