Learn R Programming

aphylo (version 0.3-3)

mislabel: Switch labels acoording to mislabeling probabilities

Description

Switch labels acoording to mislabeling probabilities

Usage

mislabel(atree, psi)

Value

An object of class aphylo with modified labels.

Arguments

atree

An object of class aphylo.

psi

Numeric vector of length 2. Misclasification probabilities. (see LogLike).

Examples

Run this code

set.seed(131)
x <- raphylo(5, P=2, psi=c(0,0))
x$tip.annotation

# Flipping 0s to 1s and vice versa
mislabel(x, psi = c(1,1))$tip.annotation

Run the code above in your browser using DataLab