## Not run:
# # The following is in the Hmisc tests directory
# # For a knitr example see latexTherm.Rnw in that directory
# ct <- function(...) cat(..., sep='')
# ct('\documentclass{report}\begin{document}\n')
# latexTherm(c(1, 1, 1, 1), name='lta')
# latexTherm(c(.5, .7, .4, .2), name='ltb')
# latexTherm(c(.5, NA, .75, 0), w=.3, h=1, name='ltc', extra=0)
# latexTherm(c(.5, NA, .75, 0), w=.3, h=1, name='ltcc')
# latexTherm(c(0, 0, 0, 0), name='ltd')
# ct('This is a the first:\lta and the second:\ltb\\ and the third
# without extra:\ltc END\\\nThird with extra:\ltcc END\\
# \vspace{2in}\\
# All data = zero, frame only:\ltd\\
# \end{document}\n')
# w <- pngNeedle(c(.2, .5, .7))
# cat(base64::img(w)) # can insert this directly into an html file
# ## End(Not run)
Run the code above in your browser using DataCamp Workspace