Learn R Programming

eDITH (version 1.0.0)

sampling_strategy_direct: Determine optimal spatial arrangement for direct sampling

Description

Function that determines the optimal spatial arrangement for direct sampling sites

Usage

sampling_strategy_direct(river, nSites)

Value

A vector containing the ID of the nSites selected sites according to this strategy. Sites are sorted according to their rank (i.e., the first site in the vector is the first one that has been selected).

Arguments

river

A river object generated via aggregate_river.

nSites

Number of sites to be deployed. Cannot be higher than river$AG$nNodes.

Examples

Run this code
library(rivnet)
data(wigger)
wigger <- paths_river(wigger) 
sites <- sampling_strategy_direct(wigger, 20)
plot(wigger)
points_colorscale(wigger$AG$X[sites], wigger$AG$Y[sites], 1:20)
title("Rank of selected sites")
  

Run the code above in your browser using DataLab