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

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -