read.CEP(fName, mValue=-99.9, impZero=0)
write.CEP(x, fName, fTitle=fName, type = "condensed",
nSig=5, nCouplets=4, mValue=-99.9)condensed or full. condensed is usually used for species data and full for environmental dataread.CEP returns a data frame with species as columns and sites as rows. Columns with zero totals (ie. species with no occurrences) are deleted. Column and row names are taken from the species and site names in the CEP file: invalid characters in the names (including spaces) are replaced by "." and names are made unique using make.names.
write.CEP returns a list with two named elements, site.names and sp.names, each character matrix of two columns giving the original and saved site or species names.read.CEP and write.CEP are functions to read and write data in the Cornell Ecology Program (CEP) format. CEP condensed format was originally designed by Mark Hill as an efficient way of storing species abundance data for use with his DECORANA and TWINSPAN programs (Hill 1979a, b), and subsequently adopted by CANOCO (ter Braak & Smilauer, 1998) where full and free format variations were added. read.CEP and write.CEP can read/write data in condensed and full formats. The CEP in read.CEP is capitalised to distinguish it from a similar function (read.cep) in the vegan package, which can also import data in CEP free
write.CEP takes the site and species names from the rownames and colnames of the input data frame. Names in CEP format are limited to a maximum of 8 characters - if they excede this limit they will be abbreviated using the function make.cepnames in the package vegan and a warning issued. The function invisibly returns a list of original and saved names.read.cep.pth <- system.file("example.datasets/RLGHLongCore.cep", package="rioja")
rlgh <- read.CEP(pth)
depth <- as.numeric(gsub("r_", "", rownames(rlgh)))
mx <- apply(rlgh, 2, max)
rlgh.sub <- rlgh[, mx > 5]
strat.plot(rlgh.sub, scale.percent=TRUE, yvar=depth, y.rev=TRUE,
wa.order="bottomleft")Run the code above in your browser using DataLab