Description Usage Arguments Examples
View source: R/list.make.textable.R
Booktabs table from list of matrices Make a latex table to use with the booktaps package from a list of arrays
1 2 3 |
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 |
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()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.