write_attr: Functions to write attributes of Gadget components to file

Description Usage Arguments Value

Description

These functions are used within the write_gadget_file methods to write data from the gadget file type in R to an appropriate file in the Gadget model. write_gadget_attributes is a generic function with methods specific for various different types of gadget files.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
write_gadget_attributes(gf, path = NULL, env = parent.frame())

## S3 method for class 'gadget_fleet'
write_gadget_attributes(gf, path = NULL,
  env = parent.frame())

## S3 method for class 'gadget_stock'
write_gadget_attributes(gf, path = NULL,
  env = parent.frame())

## S3 method for class 'data.frame'
write_gadget_attributes(gf, path = NULL)

## S3 method for class 'list'
write_gadget_attributes(gf, path = NULL)

## S3 method for class 'gadget_spawnfile'
write_gadget_attributes(gf, path = NULL)

## S3 method for class 'gadget_strayfile'
write_gadget_attributes(gf, path = NULL)

get_attr_filename(filename)

Arguments

gf

The Gadget file component to be written. Should be of class gadget_fleet, gadget_stocks, but can alternately be a data.frame

path

Optional. Character of the path of the directory to look in

env

An environment to search for the object named path

obj

The attribute to be checked for filename

Value

Nothing. Writes the appropriate Gadget file, aggfile or data file to a text file


inspktrgadget/gadgetSim documentation built on May 10, 2019, 9:51 a.m.