prob.subset: Subset probabilities above a threshold

View source: R/generics.R

prob.subsetR Documentation

Subset probabilities above a threshold

Description

This function subsets out probabilities assigned to planning units above a threshold. It effectively sets the probability that species inhabit planning units to zero if they are below the threshold.

Usage

prob.subset(x, species, threshold)

## S3 method for class 'RapData'
prob.subset(x, species, threshold)

## S3 method for class 'RapUnsolOrSol'
prob.subset(x, species, threshold)

Arguments

x

RapData(), RapUnsolved(), or RapSolved() object.

species

integer vector specifying the index of the species to which the threshold should be applied.

threshold

numeric probability to use a threshold.

Value

RapData() or RapUnsolved() object depending on input object.

See Also

RapData(), RapUnsolved(), RapSolved().

Examples

## Not run: 
# load data
data(sim_ru)

# generate new object with first 10 planning units
sim_ru2 <- prob.subset(sim_ru, seq_len(3), c(0.1, 0.2, 0.3))

## End(Not run)

paleo13/rapr documentation built on Feb. 12, 2024, 3:27 a.m.