Learn R Programming

mefa (version 1.0-4)

report.mefa: Reports Object of Class 'mefa'

Description

Makes a report from the data of an object of class 'mefa' in plain text or formatted LaTeX file.

Usage

report.mefa(filename, mf, order = "species", biotic.data = 1, 
    species.name = 1, species.order = 1, author = 0, 
    tex = FALSE, binary = FALSE, sep = c(", ", " (", ")", "; "))

Arguments

filename
name of the file to be created in the working directory.
mf
an object of class 'mefa'.
order
type of ordering (sectioning), by "species" (default) or by "samples".
biotic.data
list of columns (up to six columns) in the sample attribute table of the 'mefa' object, data will be sorted according to subsequent columns.
species.name
a column identifier in the species attribute table of the 'mefa' object containing species names.
species.order
a column identifier in the species attribute table of the 'mefa' object, by which the ordering of species names can be made (eg. according to taxonomy).
author
a column identifier in the species attribute table of the 'mefa' object, containing author names for species. By default it is 0, that is no author names are listed.
tex
logical operator, if TRUE species names will be italicized and sectioning will be used according to order argument. Default is FALSE.
binary
logical operator, if TRUE count data will not be written into the output file. Default is FALSE, when count data are presented.
sep
a character list with four elements, containing separator strings. The first is placed between biotic.data values, second is placed before, third is after the count value, fourth is the separator between full data entries. After the last

Value

  • A text file named filename is written in the working directory.

Details

When tex = TRUE, the result can be directly used in a LaTeX document by copy-pasting the output or by the include option.

See Also

mefa

Examples

Run this code
data(landsnail, vhabitat, vsample, vtable)

vt <- as.xcount(vtable, FALSE)
spec <- xorder(vt, which="species", landsnail, 2)
sampl <- xorder(vt, which="samples", vsample, 1)
vmf <- mefa(vt, sampl, spec)
v2 <- strify(vmf, strata = "site.descr", which = "samples")
habi <- xorder(as.xcount(v2), which="samples", vhabitat, 2)
vmf2 <- mefa(as.xcount(v2), habi, spec)

report.mefa("vspec-report.txt", vmf2, "species", c(3,2,4:7), "spec.name", "order", 0,
    FALSE, FALSE, sep = c(", "," (",")","; "))

report.mefa("vsampl-report.txt", vmf2,"samples", c(3,2,4:7), "spec.name", "order", 0,
    FALSE, FALSE, sep = c(", "," (",")",",\n"))

report.mefa("vspec-report.tex", vmf2,"species", c(3,2,4:7), "spec.name", "order", "author",
    TRUE, FALSE, sep = c(", "," (",")","; "))

report.mefa("vsampl-report.tex", vmf2,"samples", c(3,2,4:7), "spec.name", "order", "author",
    TRUE, TRUE, sep = c(", "," (",")",",\n"))

### Sweave example

mefadocs("SampleReport")

Run the code above in your browser using DataLab