## Import SSN object
copy_lsn_to_temp() ## Only needed for this example
mf04p <- ssn_import(paste0(tempdir(), "/MiddleFork04.ssn"),
predpts = "pred1km",
overwrite = TRUE
)
## Subset SSN observations, edges, and prediction sites on network 1
ssn.sub1 <- ssn_subset(mf04p,
path = paste0(tempdir(), "/subset1.ssn"),
subset = netID == 1, clip = TRUE,
overwrite = TRUE
)
## Subset SSN observations, removing two sites
ssn.sub2 <- ssn_subset(mf04p,
path = paste0(tempdir(), "/subset2.ssn"),
subset = !COMID %in% c("23519461", "23519365"),
overwrite = TRUE
)
Run the code above in your browser using DataLab