read.rarecol {PAICE} | R Documentation |
Read files containing rarefaction curves of colonization events
Description
An import method for data generated by rarecol
.
Usage
read.rarecol(gen, field)
Arguments
gen , field |
filenames of genetic and field estimation data. |
Details
This function uses read.table
to import both files
created by rarecol
.
Value
This function returns an object of class
rarecol
.
This object is a list in which each element is a data.frame containing
information about colonization inference.
References
Coello, A.J., Fernandez-Mazuecos, M., Heleno, R.H., Vargas, P. (2022). PAICE: A new R package to estimate the number of inter-island colonizations considering haplotype data and sample size. Journal of Biogeography, 49(4), 577-589.DOI: 10.1111/jbi.14341
See Also
rarecol
for building of rarefaction curves of colonization
events.
Examples
data(CmonsData)
data(CmonsNetwork)
# Make rarefaction curves and save it in working directory,
## Note: only one replicate per sampling to it quickly
rarecol(data = CmonsData, network = CmonsNetwork,
replicates_field = 1, replicates_genetic = 1,
monitor = TRUE, file = "rareData")
# Genetic estimation has the suffix "_gen" and the field "_field"
raredata <- read.rarecol(gen = "rareData_gen.csv",
field = "rareData_field.csv")
str(raredata) # Show structure of data imported
# Remove files created
file.remove("rareData_gen.csv", "rareData_field.csv")
[Package PAICE version 1.0.2 Index]