Description Usage Arguments Details Value Examples
View source: R/spliceSSNSites.R
This function does the reverse of splitSSNSites
. Instead of separating a SpatialStreamNetwork
object into different shapefiles, this function combines a set of observed points from a shapefile with an existing SSN object.
1 | spliceSSNSites(ssn, new.ssn.path, splice.obs, splice.preds = NULL)
|
ssn |
An object of class SpatialStreamNetwork |
new.ssn.path |
A file path to a folder to store the augmented ssn. |
splice.obs |
A file path for the shapefile of observed sites which should be brought into the ssn object. |
splice.preds |
Optionally a file path for a shapefile of prediction points which should also be brought into the ssn object. This can be (and is by default) NULL if there are no such prediction points. |
As for splitSSNSites
, this function is wrapped by optimiseSSNDesign
. While optimiseSSNDesign
should be sufficient for solving most adaptive design problems, more specialised or unusual applicaitons may require this function to be used separately.
An object of class SpatialStreamNetwork that contains the old and new sites.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
s <- createSSN(10, binomialDesign(100, 2), path = tempPath("r.ssn"), importToR = T)
# Split SSN sites into two shapefiles, one for each year
split <- splitSSNSites(s, tempPath("split.ssn"), "Time", FALSE, tempdir())
# Join the year 2 shapefile back to the year 1 shapefile in the SSN
spliced <- spliceSSNSites(split, tempPath("spliced.ssn"), paste0(tempdir(), "/sites2.shp"))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.