View source: R/replacePrjParameters.R
| replacePrjParameters | R Documentation |
.prj fileReplaces the existing values of a single parameter, for all HRUs,
in a .prj file. This differs from setPrjParameters in that this function can
change the number of values (i.e. the number of HRUs) for a parameter. It
is intended for use in deletePrjHRUs. Note
that this function is very destructive, so it's a good idea to have a backup copy
of your .prj file before running it!
replacePrjParameters(
inputPrjFile = "",
paramName = "",
paramVals = "",
outputPrjFile = "",
oldParamCount = 0,
quiet = TRUE,
logfile = ""
)
inputPrjFile |
Required. Name of the |
paramName |
Required. Name of parameter to set. |
paramVals |
Required. Vector containing new parameter values. |
outputPrjFile |
Optional. If omitted, the input |
oldParamCount |
Optional. If > 0, then this parameter sets the number of
HRUs in the original |
quiet |
Optional. Suppresses display of messages, except for errors. I
f you are calling this function in an R script, you will usually leave |
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, returns TRUE. If unsuccessful, returns FALSE.
Currently, this function has only been tested on simple .prj files,
i.e. without REW Grp parameters. It might work for complex files if
the REW Grp specification is included in the parameter name.
Kevin Shook
deletePrjHRUs setPrjParameters
## Not run:
result <- replacePrjParameters("CRHM/Bad74_Frozen.prj",
"fetch", c(1500, 100))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.