Learn R Programming

pop (version 0.1)

probability: probability transfun

Description

Create a transfun object representing a probability of transition between states. Typically used inside a call to transition

Usage

probability(value)
p(value)
is.probability(x)

Arguments

value
a numeric between 0 and 1 representing a probability
x
an object to be tested as a probability transfun object

Details

p() is a shorthand for probability().

Examples

Run this code
# these are equivalent
prob <- probability(0.2)
prob <- p(0.2)

is.probability(prob)

Run the code above in your browser using DataLab