collapse {SSNbayes}R Documentation

Collapses a SpatialStreamNetwork object into a data frame

Description

Collapses a SpatialStreamNetwork object into a data frame

Usage

collapse(ssn, par = "afvArea")

Arguments

ssn

An S4 SpatialStreamNetwork object created with SSN2 package.

par

A spatial parameter such as the computed_afv (additive function value).

Details

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 .

Value

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.

Examples


#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')

[Package SSNbayes version 0.0.3 Index]