Closed gorkang closed 5 years ago
Thanks! I don't fully understand Errror 2, could you provide a full example rmd?
Regarding Error 1 out of curiosity what's the reason for commenting out chunks instead of using eval=FALSE and similar options?
Regarding Error 2, the best simple example might be the accepted response here: https://stackoverflow.com/questions/21729415/generate-dynamic-r-markdown-blocks
Regarding Error 1. Mmmm, I guess no real reason. Something like... "hey, I'm gonna comment this as I am not using it now but I might need it in the future" :)
Cheers!
Ok so it'd be fair for us not to solve error 1, since one could use chunk options?
Will look at error 2 examples from that SO soon but an example Rmd of yours would help a lot.
Sorry about not posting a reproducible example initially.
Here you have an Rmd file where namer::name_dir_chunks() fails (Error 2). namer_bug.zip
Regarding Error 1. Not sure how hard it will be to fix, but given commenting full chunks of code is a possibility in Rmd, the problem may come out again in the future. Maybe a regexp, "ignore everything inside " could be enough? But of course, feel free to close this :)
@gorkang can you confirm the latest version solves the errors you encountered?
It does! Thanks!
Awesome, thanks for the bug reports, we hope the package can be useful to you! ✨
I tried
namer::name_dir_chunks("Reports/")
and failed in the following bits of code:Error 1
Full R code chunk commented inside a .Rmd
<!-- ```{r plot_altmetrics_scatter, echo=FALSE, fig.height=10, fig.width=10, message=FALSE, warning=FALSE, results='asis', fig.align="center"} -->
Error 2
Here I dinamically create r code chunks (getting rid of offending characters on the fly)