lesson-example
lesson-example copied to clipboard
Silent syntax error in Rmd example
There seems to be a silent error in the 05-rmarkdown-example.Rmd template included.
The error is also visible in the logs of GitHub Actions:
/home/runner/work/lesson-example/lesson-example/_episodes_rmd/05-rmarkdown-example.Rmd
--------------------------------------------------------------------------------------
ERROR 1: <text>:187:1: unexpected '>'
186:
187: >
^
but looking at the file it's not clear to me what is wrong.
I believe it's a bug with renv that doesn't recognize properly code blocks prefixed with > as found in exercises and solutions.
@maxim-belkin's pull request removes the warning. However, using renv.ignore = TRUE leads renv to ignore the chunk when looking for dependencies. In this case, it's fine because the only function used in the chunk belongs to base R but in other contexts this approach could lead to dependencies not being recognized.