savetexvalue | R Documentation |
savetexvalue helps saving and managing values calculated in R for integration in projects written in LaTeX in an automatic and reproducible way. savetexvalue uses special formatted '.tex' files containing pairs of values and command names to be used in LaTeX.
The savetexvalue package contains three functions:
save_tex_value
for saving values to file.
remove_tex_value
for removing values from file.
print_tex_value
for displaying the contents of a value-tex file in
your R session.
Ro'ee Levy, Ori Shoham
Maintainer: Ori Shoham
ori.shoham1@gmail.com
## Not run: file <- tempfile() #save "a", "b", and "c" save_tex_value(values = 1:3, names = c("a","b","c"), file_name = file) # Save percent values to the same file save_tex_value(values = 0.5, names = "halfPer", file_name = file, percent = TRUE) # override "a" with a different value a <- rnorm(1) save_tex_value(values = a, names = "a", file_name = file, digits = 4) # print "a" and "halfPer" print_tex_value(file, names = c("a", "halfPer")) # remove "b" and "c" from file # delete file with base::unlink() unlink(paste0(file,".tex")) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.