R Markdown kniter and LateX issue -
ok, running frustrating situation try display latex table via rmd(kniter) , output commented out. result shows latex code, not table.
what missing?
--- title: '2' author: "aaron soderstrom" date: "july 1, 2015" output: html_document --- ```{r } library('xtable') df <- data.frame(a = c(1.00123, 33.1, 6),b = c(111111, 3333333, 3123.233)) print(xtable(df, display = c("s","f","f"), digits = 4), format.args = list(big.mark = " ", decimal.mark = ",")) ```
output:
print(xtable(df, display = c("s","f","f"), digits = 4), format.args = list(big.mark = " ", decimal.mark = ",")) ## % latex table generated in r 3.1.0 xtable 1.7-4 package ## % wed jul 01 15:29:02 2015 ## \begin{table}[ht] ## \centering ## \begin{tabular}{rrr} ## \hline ## & & b \\ ## \hline ## 1 & 1,0012 & 111 111,0000 \\ ## 2 & 33,1000 & 3 333 333,0000 \\ ## 3 & 6,0000 & 3 123,2330 \\ ## \hline ## \end{tabular} ## \end
try this:
```{r results='asis'} library('xtable') df <- data.frame(a = c(1.00123, 33.1, 6),b = c(111111, 3333333, 3123.233)) print(xtable(df, display = c("s","f","f"), digits = 4), format.args = list(big.mark = " ", decimal.mark = ","),type="html") ```
Comments
Post a Comment