Learn R Programming

phylotools (version 0.1.2)

framsub: Pattern of substitutions of a dataframe.

Description

This function will replace the specified character in the egde of each element to the replacement character of the second column of the input dataframe.

Usage

framsub(x, pattern = "-", replacement = "?")

Arguments

x
The input dataframe.
pattern
A character to be matched.
replacement
A character to be replaced.

Value

A dataframe with the matched characters at the two edges replaced.

Details

This is a general application of the function edgesub.The only the matched characters at the egde of the input DNA string will be replaced.

References

Kress W., Erickson D., Jones F., Swenson N., Perez R., Sanjur O., Bermingham E., Plant DNA barcodes and community phylogeny of a tropical forest dynamics plot in Panama. Proceedings of the National Academy of Sciences of the United States of America. 2009 18621-18626

See Also

See Also edgesub

Examples

Run this code

##framsub example ########
dir <- system.file("extdata", package = "phylotools")
setwd(dir)
testphy <- read.phylip("rbcla.phy")
testdat <- phy2dat(testphy)
framsub(testdat)

Run the code above in your browser using DataLab