Make a copy of a named model/variant and documentation in a user defined workspace
e2ep_copy.Rd
Make a copy of a named model/variant and documentation in a user defined workspace
Arguments
- model.name
Name of model to copy.
- model.variant
Name of model variant to copy.
- source.path
Relative path from the current working directory to the source model to be copied. Setting source.path="" is valid. Default source.path=NULL, meaning read a Barents Sea model setup from the package folder extdata/Models.
- dest.path
Relative path from the current working directory to a destination address in which to create a 'Models' folder if necessary, and then copy the model files. Setting dest.path="" is valid. Default dest.path=NULL in which case the Models folder will be created in a temporary directory.
Value
A copy of an entire model/variant and the associated documentation folder in the designated workspace.
Examples
# Copy the 2011-2019 version of the Barents Sea model supplied with the package into a
# temporary folder:
e2ep_copy("Barents_Sea", "2011-2019")
#> Current working directory is 'C:/Users/jackl/OneDrive - University of Strathclyde/Documents/StrathE2E/strath-e-2-e-polar-webdev/docs/reference'
#> No 'dest.path' specified so the copied model files
#> will be directed to the temporary directory...
#> 'C:\Users\jackl\AppData\Local\Temp\RtmpSgdWsc'
#>
#> Copying model: 'Barents_Sea, variant '2011-2019':
#> from 'C:/Users/jackl/Documents/R/win-library/4.1/StrathE2EPolar/extdata/Models/Barents_Sea/2011-2019'
#> to 'C:\Users\jackl\AppData\Local\Temp\RtmpSgdWsc/Models/Barents_Sea/2011-2019'
# Dummy example illustrating copy the 2011-2019 version of the Barents Sea model
# supplied with the package into a user-defined folder (edit "Folder/Models to
# your own relative path):
# e2ep_copy("Barents_Sea", "2011-2019",dest.path="Folder/Models")
# Dummy example illustrating copying a user model into a user workspace:
# Replace "Folder1/Models" and "Folder2/Models" with your own source.path and dest.path
# remembering that these are relative to the current working directory.
# e.g.... e2ep_copy("Modelname", "Modelvariant",
# source.path="Folder1/Models",
# dest.path="Folder2/Models")