Description Usage Arguments Author(s) Examples
Once a model run is completed successfully, users can use this function to create an animation into a *.gif file.
1 | FM.animate(runname = "", workdir = "")
|
runname |
(OPTIONAL) the name of an existing model run. If it is empty, the current model run will be selected. |
workdir |
(OPTIONAL) full path to user's work directory. If it is empty, the work directory of current model run will be selected. |
Xander Wang <xiuquan.wang@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Load FloodMapper package
library(FloodMapper)
s_return <- NA
## Assume that the current model run with a name of "Lafayette_1km"
## has been completed successfully, you can run the following
## command to create an animation in *.gif format.
s_return <- FM.animate("Lafayette_1km", workdir = tempdir())
## Check if there are any errors
if (!is.na(s_return)) {
if (s_return != "") {
cat("Creating animation is failed because of the following error:\n")
cat(s_return)
} else {
cat("Creating animation is successful!\n")
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.