ndpoints: Calculate the number of design points on a network

Description Usage Arguments Details Value Examples

View source: R/ndpoints.R

Description

ndpoints(ssn, use = "pids") is a function that returns the number of design points on a SpatialStreamNetwork object, both in total and in each network.

Usage

1
ndpoints(ssn, use = "pids")

Arguments

ssn

An object of class SpatialStreamNetwork

use

A string indicating whether pids or locIDs should be used to count sites.

Details

To find the number of prediction points on a SpatialStreamNetwork object, use nppoints.

Value

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

Examples

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

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

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

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