readHFD: 'readHFD()' reads a standard HFD .txt table as a 'data.frame'

View source: R/readHFD.R

readHFDR Documentation

readHFD() reads a standard HFD .txt table as a data.frame

Description

This calls read.table() with all the necessary defaults to avoid annoying surprises. The Age column is also stripped of "-" and "+" and converted to integer, and a logical indicator column called OpenInterval is added to show where these were located. Output is invisibly returned, so you must assign it to take a look. This is to avoid lengthy console printouts.

Usage

readHFD(filepath, fixup = TRUE, ...)

Arguments

filepath

path or connection to the HFD text file, including .txt suffix.

fixup

logical. Should columns be made more user-friendly, e.g., forcing Age to be integer?

...

other arguments passed to read.table, not likely needed.

Details

No details of note.

Value

data.frame of standard HFD output, except the Age column has been cleaned, and a new open age indicator column has been added.

Note

original function submitted by Josh Goldstein, modified by Tim Riffe.


HMDHFDplus documentation built on July 9, 2023, 6:26 p.m.