cas: Steering file (*.cas)

Description Usage Arguments Value Examples

View source: R/steering.R

Description

Initialise a steering file for use within TELEMAC.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
cas(x, fname, ...)

## Default S3 method:
cas(x = NULL, fname = NULL, ...)

## S3 method for class 'list'
cas(x, fname = NULL, ...)

## S3 method for class 't2d_cas'
cas(x, fname = NULL, data = NULL, ...)

## S3 method for class 't2d_cas'
print(x, ..., n = 10)

Arguments

x

Either: NULL (default), in which case a simple template will be generated; a character string providing the name of an existing steering file; a list with named elements being the steering parameters and their values; an object of class t2d_cas.

fname

character string providing the name of the steering file that is to be generated (can also be used to replace an existing entry).

...

Arguments passed to or from other methods.

data

list that can be given to update an existing object x.

n

Maximum number of steering parameters to print.

Value

An object of class t2d_cas consisting of a list with steering parameters, and an attribute file pointing to a specific steering file.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# template steering parameters
cas_tpl <- cas()

# investigate object
cas_tpl
str(cas_tpl)
class(cas_tpl) # inherits from list

# e.g. subsetting works as with regular lists
cas_subset <- cas_tpl[1:5]
cas_subset

# update cas object (e.g. assign new file name)
cas_updated <- cas(cas_tpl, fname = "test.cas")
cas_updated

tpilz/telemac documentation built on Feb. 10, 2022, 2:12 p.m.