flr2xml: flr2xml.R Translate FLCore "FLRobject" into xml template...

Description Usage Arguments Details Value See Also Examples

Description

flr2xml.R Translate FLCore "FLRobject" into xml template ready for ICES Stock Assessment Graphs

Usage

1
2
3
4
5
6
flr2xml(FLRobject, AssessmentYear, icesID, Fage, RecruitmentAge,
  catchType = c("official", "ICES estimates", "Model estimates"),
  outputDirectory = "~/", FLim = NULL, Fpa = NULL, Bpa = NULL,
  Blim = NULL, FMSY = NULL, MSYBtrigger = NULL, Fmanagement = NULL,
  Bmanagement = NULL, RecruitmentLength = NULL, Custom = FALSE,
  CustomName = FALSE, ...)

Arguments

AssessmentYear

icesID Fage RecruitmentAge outputDirectory FLim = NULL Fpa = NULL Bpa = NULL Blim = NULL FMSY = NULL MSYBtrigger = NULL Fmanagement = NULL Bmanagement = NULL RecruitmentLength = NULL Custom = FALSE CustomName = FALSE

Details

none

Value

none

See Also

none

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
 needList <- c("XML", "RCurl", "data.table", "FLCore")
 new.packages <- needList[!(needList %in% installed.packages()[,"Package"])]
 if("FLCore" %in% new.packages) {
  install.packages("FLCore", repos="http://flr-project.org/R")
  new.packages <- new.packages[new.packages != "FLCore"]
 }
 if(length(new.packages)) install.packages(new.packages)
 lapply(needList, require, c = T)

 urls <- ("https://community.ices.dk/ExpertGroups/WGMIXFISH-NS/2015%20Meeting%20docs/06.%20Data/FLStock%20objects/North%20Sea/standardised%20RData/PLE-NS.RData")
 tmpFile <- tempfile()
 download.file(urls, destfile = tmpFile, mode = "wb")
 load(tmpFile)
 tt <- load(tmpFile)
 assign(x = "FLRobject", value = get(tt))

 flr2xml(FLRobject = FLRobject, AssessmentYear = 2015,
   icesID = "ple-nsea", Fage = c(2:6),
   Fmanagement = 0.3 , Bmanagement = 230000,
   RecruitmentAge = 1, catchType = "ICES Estimates",
   outputDirectory = "~/Data Products/FLR2XML/")


## End(Not run)

ICES-dk/rICES documentation built on May 8, 2019, 10:54 a.m.