bootstrap: Bootstrap sequences

bootstrapR Documentation

Bootstrap sequences

Description

This function can be used to bootstrap sequences.

Usage

bootstrap(sequence)

Arguments

sequence

sequence matrix.

Details

In the sequences matrix, the columns are "Taxa" and the rows are "sites". The function will bootstrap the rows.

Value

the function returns a sequence matrix with sites randomly sampled from the original matrix with replacement.

Author(s)

Liang Liu

Examples

#construct the DNA sequences of three taxa
seq <- matrix("A",ncol=4,nrow=3)
rownames(seq)<-c("taxa1","taxa2","taxa3")
seq[,2]<-"G"
seq[,3]<-"C"
seq[,4]<-"T" 
bootstrap_sample = bootstrap(seq)

data(dat.finch)
bootstrap_sample <- bootstrap(dat.finch$seq)

lliu1871/phybase documentation built on April 21, 2024, 3:16 a.m.