I am generating several tables in R and then exporting them to HTML(5). For instance:
#+BEGIN_SRC R :session *R-org* :results output raw :exports results
df <- data.frame(x=0.110, y=0.132)
rownames(df) <- "Rates"
print(ascii(df, header=TRUE, colnames=colnames(df), rownames=rownames(df),
digits=3, caption="Rates"),
type="org")
#+END_SRC
This seems to work well enough, but it creates very ugly tables. How do I assign HTML attributes (as shown with the #+ATTR_HTML
line in org manual) from the R block?
ascii()
function come from? – Tyler Sep 30 '16 at 19:06ascii
package, as it turns out. – Tyler Sep 30 '16 at 19:08R
ascii
package that prints raworg-mode
formatted tables (among other formats). For other examples see this page. – Jason Morgan Sep 30 '16 at 19:09