Closed lucygarner closed 1 year ago
Like user2554330 on StackOverflow, I can't reproduce the error, either. Could you provide more instructions on how exactly to reproduce the problem?
It seems to be intermittent. It happens when I run the code interactively.
I see. In that case, I think it's an RStudio IDE problem, not directly relevant to knitr. In theory, when you run a code chunk interactively via the green right arrow on the right of the code chunk, RStudio should read params
from your YAML metadata and create the params
variable in the R session. I'm not sure why it could fail sometimes. Anyway, if you report the problem to RStudio, they'd need instructions on how to reproduce the problem, too. Thanks!
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
This issue is also posted on StackOverflow but I haven't had a satisfactory answer yet: https://stackoverflow.com/questions/74090393/knitropts-knitsetroot-dir-paramsworking-dir-params-not-found-error
I am trying to set my working directory in the R Markdown setup chunk as follows.
My working directory is a parameter in the YAML header.
However, I keep getting the following error.
xfun::session_info()
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.