tidy_data_for_epp: Tidy data for EPP.

Description Usage Arguments Details Value

View source: R/read_xml.R

Description

Helper to tidy data and add labels for use in EPP.

Usage

1
2
tidy_data_for_epp(dat, is_percentage = FALSE, add_names = FALSE,
  site_names = NULL)

Arguments

dat

Data to be tidied.

is_percentage

True if data represents a percentage.

add_names

True if names should be added to the data.

site_names

List of site names to be used for the data.

Details

This will convert any '-1' in the data to an NA as the Java representation of the data uses -1 to indicate no data. If is_percentage is true it will divide the data by 100 as Java representation of data is in percentage but EPP needs it as a probability. If add_names is true it will add labels to the matrix or vector. If a vector then it will use years for the names. If a matrix then it will add year labels to the columns and site labels specified by site_names to the rows.

Value

The tidied and labelled data.


mrc-ide/specio documentation built on April 15, 2021, 8:37 a.m.