Learn R Programming

phylosim (version 3.0.5)

getProbs.DiscreteInsertor: Get the insertion length probabilities

Description

Get the insertion length probabilities.

Usage

# S3 method for DiscreteInsertor
getProbs(this, ...)

Arguments

this

A DiscreteInsertor object.

...

Not used.

Value

A numeric vector with the insertion length probabilities.

See Also

For more information see DiscreteInsertor.

Examples

Run this code
# NOT RUN {
       # create a DiscreteInsertor object
       i<-DiscreteInsertor(rate=1, sizes=1:3)
       # set/get length probabilities
       setProbs(i,c(1/3,1/3,1/3)) # equal probabilites
       getProbs(i)
       # set/get length probabilities via virtual field
       x<-c(2,2,1)
       # normalize x
       x<-x/sum(x)
       i$probs<-x
       i$probs
 
# }

Run the code above in your browser using DataLab