make.textable: Booktabs table from matrix Make a latex table to use with the...

Description Usage Arguments Examples

View source: R/make.textable.R

Description

Booktabs table from matrix Make a latex table to use with the booktaps package from any array

Usage

1
2
3
make.textable(array0, value.formatstring = NA, title = NA, label = NA,
  cutfunction = function(x) {     return(FALSE) }, rowcol = "red!10",
  sisetup = FALSE)

Arguments

array0

An array

value.formatstring

How should a single value of the array be formatted? (Not the row/colnames)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
arr <- matrix(rnorm(20), ncol=4, nrow=5)
rownames(arr) <- paste0("Row", 1:5)
colnames(arr) <- paste0("Col", 1:4)
make.textable(arr)
make.textable(arr, title = "abc")
make.textable(arr, title = "abc", label = "testlabel")
make.textable(arr, value.formatstring = "%5.3e")
make.textable(arr, value.formatstring = "$%5.3e$")
make.textable(arr, cutfunction=function(x){x>1})
make.textable(arr, value.formatstring = "$%5.3e$")

# to save into a file:
sink("testfile.txt")
make.textable(arr, value.formatstring = "%5.3f")
sink()

gugl58/basicscriptsGG-Package documentation built on May 17, 2019, 9:08 a.m.