nppoints: Calculate the number of prediction points on a network

Description Usage Arguments Details Value Examples

View source: R/nppoints.R

Description

The function nppoints returns the number of prediction points on a SpatialStreamNetwork object, both in total and in each network.

Usage

1
nppoints(ssn, use = "pids")

Arguments

ssn

An object of class SpatialStreamNetwork

use

A string indicating whether the pids or locIDs should be counted.

Details

To find the number of design points on a SpatialStreamNetwork object, use ndpoints.

Value

A list with two elements: a vector of prediction points by network, and a scalar being the total number of prediction points in the SpatialStreamNetwork object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
set.seed(1)

s1 <- createSSN(10, binomialDesign(10),binomialDesign(10), 
path = paste(tempdir(), "s1_no_reps_preds.ssn", sep = "/"), importToR = TRUE)
nppoints(s1)

s2 <- createSSN(10, binomialDesign(10, 2, "Time"), binomialDesign(10, 2, "Time"),
path = paste(tempdir(), "s2_reps_preds.ssn", sep = "/"), importToR = TRUE)  
nppoints(s2) # total number of observations
nppoints(s2, "locIDs") # total number of sites

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