Skip to content

Instantly share code, notes, and snippets.

View acguidoum's full-sized avatar
😎

A.C. GUIDOUM acguidoum

😎
  • University of Tamanghasset
  • Algeria
View GitHub Profile
@hadley
hadley / latex-math.r
Created May 14, 2013 14:18
A partial implementation of a R expression -> latex math converter
# User facing function
#
# to_math(x_1 + 1^{2 + 4} + 5 + sqrt(y) / 5 %/% 10)
# to_math(paste(x^2, y - 1, z_i))
# to_math(hat(tilde(ring(x))))
to_math <- function(x) {
to_math_q(substitute(x))
}
to_math_q <- function(x) {