subsetByID: Subset the observed and/or prediction sites by ID

Description Usage Arguments Details Value

View source: R/subsetSSNbyID.R

Description

This is a function to subset the observed and/or prediction sites on a SpatialStreamNetwork based on pids or locIDs.

Usage

1
subsetByID(ssn, new.ssn.path, obs, preds, locID = FALSE)

Arguments

ssn

An object of class SpatialStreamNetwork.

new.ssn.path

A path to a new .ssn directory where the outputs of this function should be stored.

obs

A numeric or character vector containing the pids or locIDs of the observed sites that should be kept in the subset.

preds

A numeric or character vector containing the pids or locIDs of the prediction sites that should be kept in the subset. This argument can be skipped.

locID

A logical indicating whether the obs and preds vectors contain pids or locIDs. Defaults to FALSE.

Details

Note, the SpatialStreamNetwork that is returned will have been re-imported from the new.ssn.path directory after the subset operations are complete.

Value

An object of class SpatialStreamNetwork containing only the specified subset of sites.


apear9/SSNdesign documentation built on Feb. 19, 2020, 4:29 a.m.