gadgetFileIO: Old style gadget file input and output (mostly deprecated)

Description Usage Arguments Value Author(s)

Description

read.gadget.likelihood reads the likelihood (input) file for gadget. The format of the likelihood file is described in gadget's user manual.

write.gadget.likelihood writes a likelihood object to file

merge.gadget.likelihood merges to likelihood objects in one

get.gadget.likelihood retrives selected parts of the likelihood object

read.gadget.file reads gadget's main file

write.gadget.main writes gadget.main object to file

clear.spaces clears tab and spaces from a string and return a list or a matrix of values

read.gadget.data reads data used by the various components

strip.comments is a helper function created to clear out all comments (indicated by ';') and unwanted spaces from gadget input and output files.

read.gadget.stockfiles reads in Gadget stockfiles DEPRECATED

read.gadget.area reads the gadget area file

write.gadget.area writes a gadget area file

read.gadget.time reads gadget time file

write.gadget.time writes gadget time file

read.gadget.table reads gadget tables

read.gadget.fleet read gadget fleet

write.gadget.fleet writes gadget fleet DEPRECATED

Usage

 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
26
27
28
29
30
31
32
33
34
35
read.gadget.likelihood(files = "likelihood")

write.gadget.likelihood(lik, file = "likelihood", data.folder = NULL,
  bs.sample = NULL)

## S3 method for class 'gadget.likelihood'
merge(lik1, lik2)

get.gadget.likelihood(likelihood, comp, inverse = FALSE)

read.gadget.main(file = "main")

write.gadget.main(main, file = "main")

clear.spaces(text)

read.gadget.data(likelihood, debug = FALSE, year_range = NULL)

strip.comments(file = "main")

read.gadget.stockfiles(stock.files)

read.gadget.area(area.file = "area")

write.gadget.area(area, file = "area")

read.gadget.time(time.file = "time")

write.gadget.time(time, file = "time")

read.gadget.table(file, header = FALSE)

read.gadget.fleet(fleet.file = "fleet")

write.gadget.fleet(fleet, file = "fleet")

Arguments

files

a vector of character strings containing the names of the likelihood files

lik

object of class gadget.likelihood

file

name of the likelihood file

data.folder

location of data folder (if changed)

bs.sample

(for bootstrap), appends the appropriate replicate number to data file

lik1

likelihood object

lik2

likelihood object

likelihood

likelihood object

comp

selected likelihood components

inverse

(logical) should inverse selection be applied

main

gadget.main object

text

string

debug

should debug information be printed

stock.files

location of stock file

area.file

location of the area file

area

data frame with area and temperature

time.file

location of the file

time

data.frame with time

header

logical, should the header be read from the file

fleet.file

location of the fleet file

fleet

a gadget.fleet

file

main file location

file

name of main file

likelihood

object of class gadget.likelihood

file

location of the gadget input file

file

location of the area file

file

location of the time file

file

path to file

file

location of the file

Value

object of class gadget.likelihood, i.e. a list containing the various likelihood components

character string corresponding to the likelihood file (if desired)

merged gadget likelihood object

likelihood object

object of class gadget.main

text of the main file (if desired)

list or matrix containing the (non-empty) values from the string

list of dataframes and degress of freedom

list containing the lines from the file stripped of unwanted text.

list of gadget-stock objects

areafile object

nothing

timefile objects

nothing

data.frame

fleet file object

nothing

Author(s)

Bjarki ??r Elvarsson

Bjarki ??r Elvarsson

Bjarki Thor Elvarsson

Bjarki Thor Elvarsson

Bjarki ??r Elvarsson

Bjarki ??r Elvarsson

Bjarki ??r Elvarsson

Bjarki ??r Elvarsson

Bjarki Thor Elvarsson

Bjarki Thor Elvarsson

Bjarki Thor Elvarsson


bthe/rgadget documentation built on Sept. 22, 2018, 1:22 p.m.