Learn R Programming

StratPal (version 0.4.0)

prob_remove: 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)

Value

a vector of the same type as x

Arguments

x

vector

prob

number between 0 and 1, probability to preserve elements

See Also

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

Examples

Run this code
x = prob_remove(1:10, 0.5)
x
x = prob_remove(1:10, 0.5)
x

Run the code above in your browser using DataLab