list.make.textable: Booktabs table from list of matrices Make a latex table to...

Description Usage Arguments Examples

View source: R/list.make.textable.R

Description

Booktabs table from list of matrices Make a latex table to use with the booktaps package from a list of arrays

Usage

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

Arguments

arrlist

list of arrays

value.formatstring

How should the values of the array be formatted? (Not the row/colnames)

cutfunction

function which decides, based on all values of the matrix if a row should be colored

rowcol

the row color

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
arr <- matrix(rnorm(20), ncol=4, nrow=5)
rownames(arr) <- paste0("Row", 1:5)
colnames(arr) <- paste0("Col", 1:4)
arrlist <- list("ARR1"=arr, "ARR2"=arr+1, "ARR3"=list("ARR3_1"=arr+2, "ARR3_2"=arr+3))
list.make.textable(arrlist)
list.make.textable(arrlist, value.formatstring = "%5.3f")
list.make.textable(arrlist, value.formatstring = "\\textit{%5.3f}")
list.make.textable(arrlist, value.formatstring = "\\textit{%5.3f}", sisetup=TRUE)
list.make.textable(arrlist, sisetup=TRUE)

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

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