prepData: Convert from raw data structure

Description Usage Arguments

View source: R/Module_prepData.R

Description

This function takes replicates the steps from two functions datalist.XYZ.pre() datalist.XYZ(). NOTES datafile_extract_age_class() from simple sibreg does the same as the datalist.XYZ() from the naive models and the pre=code for that which is now in a new function datalist.XYZ.pre(). However for SimpleSibReg (and SimpleLogPower?) the labels are different => handling all this in the new prepData() module, with an options on the labels. it also incorporates a new data converter function for old and new data formats

Usage

1
prepData(datafile, out.labels = "v1")

Arguments

datafile

datafile is a csv file in either the old format (withage differs from withoutage) or the new format (all files have the same basic format)

out.labels

out.labels = "v1" to match what the old code uses for N1,N3,N5. "v2" to match what old code uses for SIMPLESIBREG, SIMPLELOGPOWER. This is necessary to retain old functions where possible. Over the long-term, should fix this!


MichaelFolkes/forecastR_package documentation built on April 4, 2021, 5:14 a.m.