Question: Is there a way to print, from within R, a LaTeX table directly to an image file (for inclusion in another document/webpage). Basically, I'd like to supply LaTeX code to a function that saves it as an image to the working directory. 

Pipe dreams?

Answer: 
The [kableExtra](http://haozhu233.github.io/kableExtra/) package allows to make nice and customized tables via LaTeX or HTML. It also has a function to export such standalone tables to, for example, PNG or PDF via webshot. Here is an example:

```
library(kableExtra)
knitr::kable(mtcars[1:6, 1:5], "latex", booktabs = TRUE, linesep = "") %>% 
    kable_styling(full_width = TRUE, font_size = 12) %>% 
    column_spec(1, width = "4cm") %>% 
    save_kable(file = "table.png")

```

[![Export table to png using kableExtra](https://i.stack.imgur.com/wYlhE.png)](https://i.stack.imgur.com/wYlhE.png)
I don't have a good answer that includes using R, but if you were desperate, I suppose a 'print screen' and a copy to Paint or other such program and finally saving it would at least get you the image in a storable format.

I've created 'step by step' user documentation this way when other options weren't available.