Latex: Typesetting Tables in LaTeX

Description Usage Arguments Details Value Note Author(s) See Also Examples

Description

Creates meaningful table structures to be compiled by LaTeX.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## S4 method for signature 'VegsoupPartitionFidelity'
Latex(obj, choice = "species", recursive = FALSE, file,
	mode = 1,
	p.max = .05,
	stat.min,
	constancy.min = 95,
	taxa.width = "60mm",
	col.width = "10mm",
	footer.width = "150mm",
	footer.threshold,
	molticols.footer,
	use.letters = FALSE,
	caption.text = NULL,
	quantile.select,
	coverscale = FALSE,
	sep = "/",
	sites.columns,
	newpage = TRUE,
	template = FASLE,
	verbose, ...)

Arguments

obj

'VegsoupPartition' object.

choice

character. Either "species" or "sites", partial matches allowed.

recursive

logical. If TRUE, loop over partitions and create a standalone tables for each partition. If FALSE, the default, summarize information in single table.

file

character. Output filename. If missing a default filename is choosen depending on arguments choice and recursive, otherwise file is tested for validity.

mode

integer. With defaults values for choice and species (‘Details’), mode determines the type of ouput created. mode = 1 will typeset a species by cluster fidelity table. mode = 2 will typeset a summary table for each cluster. See ‘Details’.

p.max

numeric. Threshold value for Fisher test.

stat.min

numeric. Threshold value of fidelity statistic.

constancy.min

numeric. Threshold value of the constancy of species(-layer replicate).

taxa.width

LaTeX tag to set column width for taxon column. See ‘Details’.

col.width

LaTeX tag to set column width of all other columns. Recycled as necessary. See ‘Details’.

footer.threshold

integer. Minimum number of occurences of a species to become excluded from the table, defaults to 2.

molticols.footer

integer. Number of columns to typeset species meeting conditions implied by footer.threshold

footer.width

LaTeX tag to set column width for footer columns.

quantile.select

a character vector selecting dimensions returned by quantile to become pasted to the constancy value. Only applicable if mode == 2. See ‘Details’.

caption.text

character. Additional user supplied text pasted into automatically generated table caption. See ‘Details’.

sites.columns

character. Selceting columns from sites data frame.

use.letters

logical. Use additional letters. Only applicable if getK(object <= 26).

verbose

logical. Print messages on screen.

sep

character. Optional character string to separate the summary statistics of Fivenum, defaults to "/".

coverscale

logical. Recode result returend from Fivenum to ordinal scale if applicable, defaults to FALSE.

newpage

logical. Insert LaTex newpage command.

template

logical. Enclose in Latex template.

...

arguments passed to fidelity if object is not of class 'VegsoupPartitionFidelity'.

Details

Typical usages are

1
Latex(obj)
1
Latex(obj, choice = "species", recursive = FALSE, file = "foo.tex", mode = 1)
1
Latex(obj, "species", FALSE, mode = 1, ...)
1
Latex(obj, "species", FALSE, mode = 2, ...)
1
Latex(obj, "species", TRUE,  ...)
1
Latex(obj, "sites",   FALSE, ...)
1
Latex(obj, "sites",   TRUE,  ...)

If arguments choice and recursive are missing the default for both arguments apply (see ‘Usage’).

Latex is a complex function to create input files for LaTeX to typeset vegetation tables and related community summaries. It comes in four (five) flavours (see above). Some usages have many arguments, most of which have some sensible default values.

The method accepts both a 'VegsoupPartition' as well as a 'VegsoupPartitionFidelity' object. The first class is promoted to the latter class by internally calling fidelity with it's default arguments.

The choice = "species" and recursive = FALSE usage currently provides two different types of output. With mode = 1 an ordered vegetation table based on a fidelity (indicator species) statistic is created. With mode = 2 descriptive summaries for each partition (cluster) are returned. It embeds it's ouput using LaTeX package subfloat.

Set template = TRUE to wrap output in LaTex template preamble.

Value

A "list" containing the lines written to the file:

table

The main table. For mode = 2 a list of subtables for each partition (cluster).

footer.sites

Additional lines for table footer.

footer.species

Additional lines for table footer, giving species excluded from the table.

Note

To prevent the LaTeX file from being displayed on screen store the result of Latex in an object.

Author(s)

Roland Kaiser

See Also

write.verbatim

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
require(vegsoup)

data(windsfeld)
x <- VegsoupPartition(windsfeld, k = 2, method = "flexible")

## Not run: 
tex <- Latex(x, file = tempfile())

fid <- fidelity(x)
class(fid)

tex <- Latex(fid, file = tempfile())

head(tex$table)

## End(Not run)

vegsoup documentation built on Feb. 24, 2021, 3 a.m.