Learn R Programming

MorphSim (version 0.1.0)

get_gamma_rates: Get discrete gamma rates

Description

Computes a set of discrete gamma rates for rate variation across sites or characters. This function is adapted from the phangorn package.

Usage

get_gamma_rates(alpha, k)

Value

Numeric vector of length k representing the discrete gamma rates.

Arguments

alpha

Numeric. The shape parameter of the gamma distribution.

k

Integer. The number of rate categories.

Examples

Run this code
get_gamma_rates(alpha = 0.5, k = 4)

Run the code above in your browser using DataLab