Description Usage Arguments Value Examples
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.
1 | read_FPA(filepaths)
|
filenames |
A character vector. The names of *.fpa files for importing. |
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.
1 2 3 4 5 | ## Not run:
filenames <- list.files(pattern = "*\\.fpa")
dat.out <- read_FPA(filenames)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.