powered by
Print a matrix, allowing fractions or LaTeX output
printMatrix(A, parent = TRUE, fractions = FALSE, latex = FALSE, tol = sqrt(.Machine$double.eps))
A numeric matrix
flag used to search in the parent envir for suitable definitions of other arguments. Set to TRUE (the default) if you want to only use the inputs provided.
TRUE
If TRUE, print numbers as rational fractions
If TRUE, print the matrix in LaTeX format
Tolerance for rounding small numbers to 0
The formatted matrix
fractions
# NOT RUN { A <- matrix(1:12, 3, 4) / 6 printMatrix(A, fractions=TRUE) printMatrix(A, latex=TRUE) # }
Run the code above in your browser using DataLab