safe_read: Safely read data from file

Description Usage Arguments Value

View source: R/misc.R

Description

Reads data from file if it exists and is readable. Outputs sane error message if either of these conditions is not met.

Usage

1
safe_read(path, data, ...)

Arguments

path

Path to file.

data

Character determining read function to use: 'char' for readChar or 'bin' for readBin.

...

Arguments passed to underlying read function.

Value

Character or numeric vector depending on input data.


ssokolen/rnmrfit documentation built on Nov. 23, 2018, 12:25 a.m.