generate | R Documentation |
'generate()' can generate a range of different MFCL objects including 'par' and 'freq' files. The exact behaviour depends on the type of objects passed to 'generate()'. It is used to (hopefully) improve the workflow when manipulating MFCL objects in R, particularly when preparing objects for running projections, but also when generating new stock assessment input files from pseudo data.
generate(x, y, z, ...)
## S4 method for signature 'MFCLFrq,MFCLprojControl,ANY'
generate(x, y, z, ...)
## S4 method for signature 'MFCLPar,MFCLPar,MFCLFrq'
generate(x, y, z, ..., projection = TRUE)
## S4 method for signature 'MFCLPar,MFCLFrq,ANY'
generate(x, y, z, ...)
## S4 method for signature 'MFCLPar,MFCLPar,MFCLTagProj'
generate(x, y, z, ...)
## S4 method for signature 'MFCLTag,MFCLTag,missing'
generate(x, y, z, ...)
## S4 method for signature 'MFCLFrq,MFCLPseudo,MFCLTag'
generate(x, y, z, eff_crp_mult, ...)
## S4 method for signature 'MFCLIni,MFCLMSEControl,MFCLTag'
generate(x, y, z, z2 = "missing", ...)
x |
An MFCLFrq or MFCLPar object that will be expanded. |
y |
If |
z |
If |
... |
Additional arguments (currently unused). |
There are currently five 'generate()' methods:
Generate an expanded MFCLFrq object from an existing MFCLFrq object and a MFCLprojControl object.
Generate an expanded MFCLPar object from an existing MFCLPar object and a MFCLFrq object. This is typically used for taking a expanding an existing par and using a 00 par (generated using the MFCL executable).
Generate an expanded MFCLPar object from an existing MFCLFrq object. This can be a useful way of avoiding making a 00 par with MFCL executable, reading it in, and blowing it up. It can be used for standard projection analyses that do not include additional tag data. Tests for this method can be found in the inst/mfcl_tests folder of the package source.
Generate an expanded MFCLPar object from an existing MFCLFrq object and a MFCLTagProj object. This method is method can be used to set up par objects that include additional tag data.
Generate new stock assessment input files MFCLFrq, MFCLTag, etc. objects from an MFCLPseudo object and a MFCLTagProj object.
An object of the same type as the x
argument, expanded and hopefully useable for running projections.
MFCLprojControl
MFCLFrq
MFCLPar
## Not run:
# Expanding an MFCLFrq, e.g. that was used from in an assessment
frq <- read.MFCLFrq(initial_frq)
projCtrl <- MFCLprojControl(nyears=nyears, nsims=1, avyrs=avyrs, fprojyr=first_proj_yr, controls=proj_controls)
projfrq <- generate(frq, projCtrl)
# Expanding an MFCLPar, e.g. that was generated as part of an assessment.
# After making a 00 par with the MFCL executable.
par <- read.MFCLPar(initial_par, first.yr=first_yr)
zero.par <- read.MFCLPar("00.par" first.yr=first_yr)
# Generate the new par file which has the right size for everything and has all the old information
projpar <- generate(par, zero.par, projfrq)
# Alternatively, expanding an MFCLPar without using the 00 par
projpar <- generate(par, projfrq)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.