generate_coevent_number_dirichlet: Generate the number of events according to the dirichlet...

Description Usage Arguments Value

View source: R/generate_coevent_number_dirichlet.R

Description

This function puts species into coexpansion events according to dirichlet process. It will go through the list of species one by one, and determine whether each one should be assigned to a existing event or to a new event, with probabilities determined by the alpha parameter.

Usage

1
generate_coevent_number_dirichlet(species, alpha, maxevent = NA)

Arguments

species

A vector of species names

alpha

A numeric. The parameter alpha for the dirichlet process

maxevent

An integer for the maximum number of event allowed. The default is NA– no limits on the maximum number of events.

Value

A list, the length of which is equal to the number of events. Each element of the list is a vector of species names assigned to the event


huatengh/CoExpansionValidation documentation built on Nov. 19, 2021, 11:07 a.m.