safe_read: Safely read data from file

Description Usage Arguments Value

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 May 23, 2019, 1:48 p.m.