HFCparse: HFCparse internal function for modifying freshly read HCD...

View source: R/HFDutils.R

HFCparseR Documentation

HFCparse internal function for modifying freshly read HCD data in its standard form

Description

called by readHFC() and readHFCweb(). We assume there are no factors in the given data.frame and that it has been read in from the raw text files using something like: read.csv(file = filepath, stringsAsFactors = FALSE, na.strings = ".", strip.white = TRUE). This function is visible to users, but is not likely needed directly.

Usage

HFCparse(DF)

Arguments

DF

a data.frame of HFC data, freshly read in.

Details

This parse routine is based on the subjective opinions of the author...

Value

DF same data.frame, modified so that columns are of a useful class. If there were open age categories, such as "-" or "+", this information is stored in a new dummy column called OpenInterval. Values of 99 or -99 in the AgeInterval column are replaced with "+" and "-", respectively. Year taken from Year1, and YearInterval is given, rather than Year2. Users wishing for a central time point should bear this is mind. The column Country is renamed CNTRY. Otherwise, columns in this database are kept in the data.frame, in case they may be useful.


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