readCreateSAGxml: Create and read the SAG XML data transfer file

Description Usage Arguments Value See Also Examples

Description

Convert between R data (a list and a data.frame) and the XML format required for uploading data to the SAG database.

Usage

1
2
3
createSAGxml(info, fishdata)

readSAGxml(file)

Arguments

info

a list of stock information

fishdata

a data frame of fish data

file

an xml file name

Value

Either a list containing info and fishdata, or a string containing the xml file.

See Also

stockInfo creates a list of stock information.

stockFishdata creates a data frame of fish stock summary data.

Examples

1
2
3
4
5
6
7
info <- stockInfo(StockCode = "cod.27.347d",
                  AssessmentYear = 2017,
                  ContactPerson = "itsme@fisheries.com")
fishdata <- stockFishdata(Year = 1990:2017, Catches = 100)
xmlfile <- createSAGxml(info, fishdata)

out <- readSAGxml(xmlfile)

icesSAG documentation built on May 2, 2019, 12:36 p.m.