export_to_latex_loop: An Export Function to produce LaTeX tables for many objects...

Description Usage Arguments Examples

Description

Calls export_to_latex for every objects given. Exports the R data object into a tex file with the same name as in the R working environment (into the current working directory). Automatically detects integers, strings, and numerics automatically formatting accordingly as string or numerical (with significant figures). Allows formatting of spaces in rownames.

Usage

1
export_to_latex_loop(object_list)

Arguments

object_list

string or character vector. Names of objects (data matrices or data frames) to be exported as LaTeX tables with names assigned in the R working environment. This is compatible with the output of ls() and any grep() searches of it.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data_matrix <- matrix(rnorm(500), 50, 10)
rownames(data_matrix) <- 1:50
colnames(data_matrix) <- letters[1:10]

data_frame <- as.data.frame(matrix(rnorm(1200), 60, 20))
rownames(data_frame) <- 1:60
colnames(data_frame) <- letters[1:20]

objects <- c("data_matrix", "data_frame")

export_to_latex_loop(objects)

TomKellyGenetics/R2LaTeX documentation built on May 9, 2019, 4:52 p.m.