Description Usage Arguments Details Value
View source: R/transformSSNVars.R
The process of modifying the data.frame objects in the observed and predicted sites of a SpatialStreamNetwork can be complicated. This function simplifies this process.
1 2 | transformSSNVars(ssn, new.ssn.path, obs.vars, preds.vars, func,
write.out = FALSE, ...)
|
ssn |
An object of class SpatialStreamNetwork |
new.ssn.path |
The directory in which a new .ssn directory should be written out. Ignored if write.out = FALSE. |
obs.vars |
A character vector containing the names of the columns in the observed sites point.data slot which should be transformed. If this is a named vector, then new columns with those names will be added. Otherwise, the old columns will be overwritten. |
preds.vars |
A character vector containing the names of the columns in the prediction sites point.data slot which should be transformed. If this is a named vector, then new columns with those names will be added. Otherwise, the old columns will be overwritten. |
func |
The function which should be used to transform the columns. |
write.out |
A logical indicating whether the .ssn folder in |
... |
Additional arguments to func. |
Note, if write.out = TRUE then the SSN will be re-imported before returning. Note also that write.out = TRUE will cause the data inside the .ssn directory to be overwritten.
An object of class SpatialStreamNetwork
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.