collapse | R Documentation |
Collapses a SpatialStreamNetwork object into a data frame
collapse(ssn, par = "afvArea")
ssn |
An S4 SpatialStreamNetwork object created with SSN2 package. |
par |
A spatial parameter such as the computed_afv (additive function value). |
The parameters (par) has to be present in the observed data frame via ssn_get_data(n, name = "obs"). More details of the argument par can be found in the additive.function() from SSN .
A data frame with the lat and long of the line segments in the network. The column line_id refers to the ID of the line.
#require("SSN2")
#path <- system.file("extdata/clearwater.ssn", package = "SSNbayes")
#ssn <- SSN2::ssn_import(path, predpts = "preds", overwrite = TRUE)
#t.df <- collapse(ssn, par = 'afvArea')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.