readPTfromstep11csv: (ISBM/CYER) Import one or more ISBM index files, in step11...

Description Usage Arguments Value Examples

Description

(ISBM/CYER) Import one or more ISBM index files, in step11 csv format.

Usage

1
2
readPTfromstep11csv(filenames, agerange = NA, country = c("canada",
  "us"))

Arguments

filenames

A character vector. The names of the *step11*.csv files for import.

agerange

A character vector of length one. This overrides the age range value declared in the file name. e.g. "2-6"

Value

A list comprising elements that are also lists, one for each .csv file imported. Each sub list comprises six elements. Their names are: metadata, data.isbm, data.isbm.long, data.isbm.ages, data.bper, data.bper.long. The element metadata is a list of seven named vectors that include all the same information at the top of each .pt file. The element data.isbm is a data frame of the ISBM index data in the same format as found in the .pt file. The element data.isbm.long is a data frame and comprises the same ISBM index data reshaped into the more useful 'long' format. The age data are exluded from data.isbm.long but can be found in data.isbm.ages, which is a data frame in long format. The element data.bper is data frame of the base perior exploitation rate data (BPER), in the same format as found in the .pt file. The element data.bper.long is the same BPER data but in long format.

Examples

1
2
3
4
5
6
7
## Not run: 
data.path <- "../data/isbm"
pt.filenames <- list.files(data.path, pattern = "*step11*.csv$")
pt.filepaths <- paste(data.path, pt.filenames, sep="/")
pt.list <- readPTfromstep11csv(pt.filepaths)

## End(Not run)

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