read.cep reads a file formatted with relaxed strict CEP format
used in Canoco software, among others.
File name (character variable).
Only positive entries, like in community data.
Cornell Ecology Programs (CEP) introduced several data formats
designed for punched cards. One of these was the ‘condensed
strict’ format which was adopted by popular software DECORANA and
TWINSPAN. A relaxed variant of this format was later adopted in
Canoco software (ter Braak 1984). Function
legacy files written in this format.
The condensed CEP and CANOCO formats have:
Two or three title cards, most importantly specifying the format and the number of items per record.
Data in condensed format: First number on the line is the site identifier (an integer), and it is followed by pairs (‘couplets’) of numbers identifying the species and its abundance (an integer and a floating point number).
Species and site names, given in Fortran format
Ten names per line, eight columns for each.
positive = TRUE the function removes all rows and
columns with zero or negative marginal sums. In community data
with only positive entries, this removes empty sites and species.
If data entries can be negative, this ruins data, and such data sets
should be read in with option
positive = FALSE.
Returns a data frame, where columns are species and rows are
sites. Column and row names are taken from the CEP file, and changed
into unique R names by
make.names after stripping the blanks.
read.cep used Fortran to read data in vegan
2.4-5 and earlier, but Fortran I/O is no longer allowed in CRAN
packages, and the function was re-written in R. The original
Fortran code was more robust, and there are several legacy data sets
that may fail with the current version, but could be read with the
previous Fortran version. Github package cepreader
https://github.com/vegandevs/cepreader/ makes available the
original Fortran-based code. The cepreader package can also
read ‘free’ and ‘open’ Canoco formats that are not
handled in this function.
The function is based on
read.fortran. If the
REAL format defines a decimal part for species abundances
read.fortran divides the
input with the corresponding power of 10 even when the input data
had explicit decimal separator. With
F5.1, 100 would become
10, and 0.1 become 0.01. Function
read.cep tries to undo this
division, but you should check the scaling of results after reading
the data, and if necessary, multiply results to the original scale.
ter Braak, C.J.F. (1984–): CANOCO – a FORTRAN program for canonical community ordination by [partial] [detrended] [canonical] correspondence analysis, principal components analysis and redundancy analysis. TNO Inst. of Applied Computer Sci., Stat. Dept. Wageningen, The Netherlands.
1 2 3 4
## Provided that you have the file `dune.spe' ## Not run: theclassic <- read.cep("dune.spe") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.