getFileAsText: read a file as text, converting if necessary

View source: R/getFileAsText.R

getFileAsTextR Documentation

read a file as text, converting if necessary

Description

read a file as text, converting if necessary

Usage

getFileAsText(f)

Arguments

f

full path to file.

Details

The type of the file is determined using the linux file utility. These type conversions are known:

  • Rich Text Format: the file is converted using unrtf --text, and the leading comments are stripped.

  • ASCII text: the file is read as-is.

Value

a vector of lines in the file, after converting to text format

Note

If the file f is empty, this returns a vector of length 0.

Author(s)

John Brzustowski jbrzusto@REMOVE_THIS_PART_fastmail.fm


MotusWTS/motusServer documentation built on Aug. 8, 2024, 10:23 p.m.