symmoments (version 1.2)

toLatex.moment: LaTeX a multivariate moment

Description

Computes a LaTeX representation sorted lexicographically of an object of class 'moment'

Usage

# S3 method for moment
toLatex(object,...)

Arguments

object

an object of class 'moment', usually the output of callmultmoments

...

Included only for consistency with generic function

Value

Character vector giving the LaTeX code for the symbolic moment

Details

The first element of the result is the moment expressed as an expected value (E[...] =). The remaining lines are the LaTex representation broken at appropriate intervals for printing. (Individual terms for high dimensions will still overrun a printed line.) Double backslashes are inserted where LaTeX requires a backslash. These can be reset to single backslashes by writing the output to a file using the R function writeLines from the base package.

References

K Phillips, Symbolic Computation of the Central Moments of the Multivariate Normal Distribution, Journal of Statistical Software, 2010.

See Also

callmultmoments and the evaluate method (symmoments)

Examples

Run this code
# NOT RUN {
toLatex(callmultmoments(c(1,2,3)))
# }

Run the code above in your browser using DataLab