Learn R Programming

delimtools (version 0.2.0)

delim_consensus: Estimate a Majority-Vote Consensus

Description

delim_consensus() estimates a majority-vote consensus over the output of delim_join in a row-wise manner.

Usage

delim_consensus(delim, n_match = NULL)

Value

an object of class tbl_df.

Arguments

delim

Output from delim_join.

n_match

An integer. Threshold for Majority-Vote calculations. If not specified, returns a warning and the threshold will be defined as ceiling(ncol(delim[, -1])/2).

Author

Pedro S. Bittencourt

Details

delim_consensus() iterates row-by-row, counting the number of matching species partition names across all species delimitations methods in delim_join output. If the sum of identical partition names is greater or equal n_match, the consensus column will be filled with its partition name. Otherwise, consensus column will be filled with NA.

Examples

Run this code

# estimate a majority vote consensus
delim_consensus <- delim_consensus(geophagus_delims, n_match= 5)

# check
delim_consensus


Run the code above in your browser using DataLab