prob_remove: probabilistic removal of elements

View source: R/prob_remove.R

prob_removeR Documentation

probabilistic removal of elements

Description

probabilistic removal of elements from x. For each element, the probability to be preserved is independent and specified by prob

Usage

prob_remove(x, prob)

Arguments

x

vector

prob

number between 0 and 1, probability to preserve elements

Value

a vector of the same type as x

See Also

  • apply_niche() and apply_taphonomy() for functions that use this function for transformation of pre_paleoTS objects

Examples

x = prob_remove(1:10, 0.5)
x
x = prob_remove(1:10, 0.5)
x

StratPal documentation built on April 3, 2025, 8:54 p.m.