[Tex/LaTex] import R data frame into org-mode table


I have an R script that generates a data frame, that I export to a CSV file. The data looks something like this:


I have an ongoing org-mode document in which I'd like to report this data. I'd like to add a table that looks something like this:

| Variant | X Axis | Y Axis | N | Mean | Standard Deviation | Standard Error |

The data will change frequently over the coming months. I'd like org-mode to auto-magically read a CSV file, to construct my org-table on-the-fly. I'd hoping to avoid copying and pasting results each time.

Is there some org-mode or emacs+ESS magic I can use to populate my empty table, with source data from my CSV file?

Best Answer

As @zeroth pointed out, this is not a TeX question, but an orgmode question. The solution, however, is pretty simple

#+BEGIN_SRC R :colnames yes :exports results