Learn R Programming

vegan (version 2.6-8)

read.cep: Reads a CEP (Canoco) data file

Description

read.cep reads a file formatted with relaxed strict CEP format used in Canoco software, among others.

Usage

read.cep(file, positive=TRUE)

Value

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.

Arguments

file

File name (character variable).

positive

Only positive entries, like in community data.

Author

Jari Oksanen

Details

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 read.cep reads 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 (10A8): Ten names per line, eight columns for each.

With option 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.

References

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.

Examples

Run this code
## Provided that you have the file "dune.spe"
if (FALSE) {
theclassic <- read.cep("dune.spe")}

Run the code above in your browser using DataLab