Learn R Programming

micompr (version 1.1.4)

toLatex.cmpoutput: Convert cmpoutput object to LaTeX table

Description

This method converts cmpoutput objects to character vectors representing LaTeX tables.

Usage

# S3 method for cmpoutput
toLatex(object, cmp_name = "Comp. 1", ...)

Value

A character vector where each element holds one line of the corresponding LaTeX table.

Arguments

object

A cmpoutput object.

cmp_name

Comparison name (to appear in table).

...

Any options accepted by the toLatex.micomp function.

Details

This method simply wraps the cmpoutput object into a micomp object, and invokes toLatex.micomp on the wrapped object.

Examples

Run this code

# Create a cmpoutput object by comparing the first output ("Pop.Sheep") of
# one the provided datasets.
cmp <-
 cmpoutput("SheepPop", 0.9, pphpc_ok$data[["Pop.Sheep"]], pphpc_ok$obs_lvls)

# Print latex table source to screen
toLatex(cmp)

Run the code above in your browser using DataLab