yihui / printr

Some (magical) printing methods for knitr
https://yihui.org/printr/
118 stars 24 forks source link

printr doesn't work when used outside RStudio #6

Closed fmichonneau closed 9 years ago

fmichonneau commented 9 years ago

If I run this from the terminal

curl https://raw.githubusercontent.com/yihui/printr/master/vignettes/printr.Rmd > /tmp/printr.Rmd; Rscript -e 'library(knitr); library(printr); knit2html("/tmp/printr.Rmd")'

the file produced doesn't have the pretty tables

screenshot from 2015-03-17 18 35 11

However, I knit the vignette in RStudio it works fine.

yihui commented 9 years ago

RStudio is irrelevant here. You are supposed to render the vignette using rmarkdwon::render() instead of knitr::knit2html(). The latter is R Markdown v1, and does not support Markdown tables without table headers.

fmichonneau commented 9 years ago

Thanks Yihui!

On Tue, Mar 17, 2015 at 10:12 PM, Yihui Xie notifications@github.com wrote:

RStudio is irrelevant here. You are supposed to render the vignette using rmarkdwon::render() instead of knitr::knit2html(). The latter is R Markdown v1, and does not support Markdown tables without table headers.

— Reply to this email directly or view it on GitHub https://github.com/yihui/printr/issues/6#issuecomment-82577380.