matout: A Matrix Output Function

Description Usage Arguments Examples

Description

This function allows you to output a matrix from R in Latex format. It is nothing more than a wrapper for 'xtable'.

Usage

1
matout(X, name = "X", justify = "c", dig = 0)

Arguments

X

a matrix

name

a name for your matrix, defaults to X

justify

should your matrix be left, right or centered? Takes the first letter as an argument and defaults to centered.

dig

the number of digits to display. This is passed directly to xtable as a parameter.

Examples

1
2
3
4
5
6
7
8
set.seed(100)
matout( matrix(floor(runif(9,1,9)),ncol=3) )

matout( matrix(runif(9,1,9),ncol=3),dig=3)

## Greek letters can also be passed, just make sure to use the '$' to tell 
## Latex that you want to be in math mode.
matout( matrix(runif(9,1,9),ncol=3),dig=3,name="$\\Psi$")

Spoted21/tt documentation built on May 9, 2019, 1:53 p.m.