ramnathv / poirot

Reproducible Blogging with R Markdown
http://ramnathv.github.com/poirotBlog
32 stars 19 forks source link

Warning in block_exec(params) #25

Open stla opened 10 years ago

stla commented 10 years ago

When blogifying my blog the following strange warning occurs :

Warning in block_exec(params) :
  failed to tidy R code in chunk <unnamed-chunk-4>
reason: Error in base::parse(text = code, srcfile = NULL) : 
  6:1: unexpected symbol
5: invisible(".BeGiN_TiDy_IdEnTiFiEr_HaHaHa.HaHaHa_EnD_TiDy_IdEnTiFiEr")
6: invisible
   ^

The Rmd file under blogification is the one generating this article.

stla commented 10 years ago

And for this article I get

Warning in block_exec(params) :
  failed to tidy R code in chunk <unnamed-chunk-10>
reason: Error in parse(text = x, keep.source = TRUE) : 
  <text>:2:4: unexpected symbol
1: library(rcdd)
2: If you
      ^
ramnathv commented 10 years ago

This is a knitr error being caused by the formatr package, which handles tidying source code printing. Try setting opts_chunk$set(tidy = F) and then running blogify. I will take a closer look at the offending chunks to tell you why formatr is throwing up this error, but for now this should do the trick.

stla commented 10 years ago

Right, it does the trick. Thank you. However, as a side effect, the rgl graphics are opened while the blogification and they remain open after.

ramnathv commented 10 years ago

That side effect is really weird, since formatr and the tidy option only affects how the source code is printed.

stla commented 10 years ago

Indeed, I could be wrong because I was tired and I ran too many blogifications today :)