| gadgetfile | R Documentation |
Constructor for objects representing a gadget model input file.
gadgetfile(file_name, file_type = "generic", components = list())
file_name |
Filename the output should be written to / read from |
file_type |
What sort of gadget file this is, e.g. 'time', 'area', ...
See |
components |
A list of lists, representing each component. |
gadgetfile objects break all files down into the following form:
; preamble before the first unnamed component key value ; preamble before the second named component [component2_name] key1 value key2 value ; preamble before the second named component [component3_name] key value . . . ; preamble before the data component [data_component] ; -- data -- ; a b c 1 2 3
Note that values can also be gadgetfile objects, in this case
That gadgetfile is written out separately, and value is replaced with
the filename of the sub-file.
A gadgetfile S3 class, use write.gadget.file to write it to disk
gadgetfile("cod.likelihood", "likelihood",
components = list(
component = list(type = "penalty", aggfile = gadgetfile("aggfile", components = list()))
))
gadgetfile('tv', file_type='timevariable',
components=list(
list('tvname', multipler=1),
timedata = expand.grid(year=1988:1990, step=1:4, value=0.2/4)))
gadgetfile('sv', file_type='stockvariable',
components=list(
list('svname', multipler=1,
stockdata = list(biomass=0, c('immature.capelin', 'mature.capelin')))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.