Description Usage Arguments Examples
View source: R/make.textable.R
Booktabs table from matrix Make a latex table to use with the booktaps package from any array
1 2 3 |
array0 |
An array |
value.formatstring |
How should a single value of the array be formatted? (Not the row/colnames) |
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()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.