Description Usage Arguments Value Note Examples
Initialise optional input files for TELEMAC-2D.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | optionals(x, fname, ...)
## S3 method for class 'character'
optionals(x, fname, ...)
## S3 method for class 'list'
optionals(x, fname, ...)
## S3 method for class 't2d_opt'
optionals(x, fname, ..., vals)
## S3 method for class 't2d_opt'
print(x, ..., n = 10)
## S3 method for class 't2d_opt_LINES'
print(x, ..., n = 10)
|
x |
Either:
a |
fname |
|
... |
Arguments passed to or from other methods. |
vals |
If |
n |
Maximum number of file lines to print. |
An object of type t2d_opt consisting of a data.frame with
elements file, file name(s) of the optional input file(s), and value,
an object of type t2d_opt_LINES that is essentially a list of
character vectors where each element represents the contents of an
optional input file.
When providing optional input files to a t2d setup the user still
needs to add the respective keywords to the steering (cas) file, otherwise the
optional input will be ignored! The reason is that many optional input files
require additional settings (keywords in the cas file) that cannot be foreseen.
So far only text-based optional input files are supported (e.g.
SECTIONS INPUT FILE or FORMATTED DATA FILE) but no binary files.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | # t2d_opt object
opt_obj <- optionals(c("# test file", "col1 col2", "1 2", "3 4"), fname = "optional.txt")
opt_obj
str(opt_obj)
# values (lines of the file) as t2d_opt_LINES object
opt_obj$value
str(opt_obj$value)
# multiple optional files
opt_obj <- optionals(list(c("# test file", "col1 col2", "1 2", "3 4"),
c("# test file 2", "col1 col2", "5 6", "7 8")),
fname = c("optional.txt", "optional2.txt"))
print(opt_obj, n = 4)
# change individual values via list methods
opt_obj$value[[1]][3] <- c("10 20")
opt_obj
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.