Check an SSN
(spatial stream network) object to ensure that it contains valid spatial, topological, and attribute information needed to fit spatial statistical stream network models using the 'SSN2' package.
ssn_check(ssn.object, check_obs = TRUE, afv_col = NULL, verbose = TRUE)
An SSN
object created using ssn_assemble
or imported using ssn_import
.
A logical indicating whether the observations should be checked. Default = TRUE
.
Character vector containing names of columns containing additive function values. The Default = NULL
.
Logical TRUE/FALSE
indicating whether details describing the checks are printed to the console. If verbose = FALSE
, a logical TRUE/FALSE
is returned indicating whether the SSN
object passed all of the checks. Default = TRUE
.
Boolean indicating whether the SSN
object is valid. If verbose = TRUE
, additional messages are printed to the console describing potential issues with the SSN
object.
## Create local temporary copy of MiddleFork04.ssn found in
## the SSN2 package. Only necessary for this example.
SSN2::copy_lsn_to_temp()
# Import the SSN object with prediction points, pred1km
mf04 <- SSN2::ssn_import(
paste0(tempdir(), "/MiddleFork04.ssn"),
predpts = c("pred1km"),
overwrite = TRUE
)
# Check the SSN object, including the additive function column,
# afvArea
ssn_check(mf04, afv_col = "afvArea")
#>
#>
#> SSN object is valid: TRUE