latex2: Write table to Latex

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

Description

A simple interface to write a file that can be typesetted with latex.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
latex2(obj, file = "foo.tex", faithful = TRUE, abundance = 0,
       taxa.width = 70, layer.width = 2, col.width = 2,
       unit = "mm", paper = "a3paper", warn = FALSE, fontsize = "10pt")

latex2triplet(obj, stat.min = 0.3, paper = c("a4paper", "a4paper", "a4paper"),
       taxa.width = c(70,70,70), fontsize = c("10pt", "10pt", "10pt"),
       file = c("faithful.tex","remaining.tex","monoptic.tex"),
       path = tempdir(), suffix = NULL)

template2(paper = "a4paper", color = "lightgray", fontsize = "10pt")

Arguments

obj

synoptic object.

file

character. A file name with extension.

faithful

logical. If TRUE subset only faithful species.

abundance

numeric. Abundance threshold value for species in the table footer. The default of abundance = 0 suppresses the creation of a table footer.

taxa.width

numeric. With of the column containing scientific species names. See also unit.

layer.width

numeric. With of the column containing the layer assignment.

col.width

numeric. Width of remaining columns.

unit

character. Any unit suitable for Latex.

warn

logical. Print warnings.

paper

character. Standard LaTex paper size.

fontsize

character. Standard LaTex font size.

color

character. Color definition for LaTex packages xcolor and colortbl.

path

character. File path.

stat.min

numeric. Threshold value of fidelity statistics.

suffix

character. String to be pasted to file names.

Details

latex2 can be used in three flavors. Given an object of class 'synoptic' latex2(obj, faithful = TRUE generates a table of faithful species only, whereas setting faithful = FALSE will produce a table of all remaining species not meeting the threshold of stat.min.

With objects of class 'monoptic' latex2 prints a series of tables, where each partition is summarized independently.

latex2triplet produces all three versions in a single step by internal calls to synoptic and monoptic. Files are named according to argument file and can be expanded with argument suffix if the default file names are acceptable. In any case, the function asks for an argument path to which files are written. Parameters paper are applied according to the types of output indicated by argument file.

Value

In case of template a list of characters, other wise a file written to disk.

Author(s)

Roland Kaiser

See Also

Latex

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
library(vegsoup)
#	dummy example with simulated data
x <- synoptic(fidelity(VegsoupPartition(coenoflex(), k = 3)))

# generate LaTex file
latex2(x, file = tempfile()) # defasult is faithful = TRUE
latex2(x, file = tempfile(), faithful = FALSE)

x <- monoptic(fidelity(VegsoupPartition(coenoflex(), k = 3)))

# generate LaTex file
latex2(x, file = tempfile())

# all three modes at once
x <- fidelity(VegsoupPartition(coenoflex(), k = 3))

latex2triplet(x, path = tempdir())

kardinal-eros/synoptic documentation built on Feb. 28, 2021, 2:32 a.m.