read_FPA: Read FPA files.

Description Usage Arguments Value Examples

Description

This reads in one or more fpa files and exports the data in two formats. The first is similar to the structure found in the fpa file (wide format), the second is in long format, which is more useful for analysis in R.

Usage

1
read_FPA(filepaths)

Arguments

filenames

A character vector. The names of *.fpa files for importing.

Value

A list, the same length as the number of fpa files in filenames. Each list element is also a list and comprises of four elements: the filename, metadata (information in the first four rows of the file), and two data frames, the data in wide format similar to that found in the fpa file, and data in long format. The rows are defined by two row variables. The variable model.stocknumber is the value found in the first column of the fpa file (after row 4, the year row). age.index is a sequence of 1 to 4 indicating the subrow location below each "main" row.

Examples

1
2
3
4
5
## Not run: 
filenames <- list.files(pattern = "*\\.fpa")
dat.out <- read_FPA(filenames)

## End(Not run)

MichaelFolkes/ctctools documentation built on May 7, 2019, 4:56 p.m.