convertSAGxml | R Documentation |
Convert between R data (a list and a data.frame) and the XML format required for uploading data to the SAG database.
createSAGxml(info, fishdata)
readSAGxml(file)
info |
a list of stock information |
fishdata |
a data frame of fish data |
file |
an xml file name |
Either a list containing info and fishdata, or a string containing the xml file.
stockInfo
creates a list of stock information.
stockFishdata
creates a data frame of fish stock summary data.
info <- stockInfo(StockCode = "cod.27.347d",
AssessmentYear = 2017,
StockCategory = 1,
ModelType = "A",
ModelName = "SCA",
ContactPerson = "itsme@fisheries.com")
fishdata <- stockFishdata(Year = 1990:2017, Catches = 100)
xmlfile <- createSAGxml(info, fishdata)
out <- readSAGxml(xmlfile)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.