You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
knit2wp(
input = 'analysis.Rmd',
title = 'COVID-19 stats for Dallas and Texas',
publish = TRUE,
action = "editPost",
postid = 3275
)
The Rmd file has many plots, and the subtitle field of each uses a parameter.
When I run that script from RStudio, it works fine. The page looks fine.
When I run that script from the command prompt, using rscript.exe, every plot is substituted with this error text: ## Error in list2(..., title = title, subtitle = subtitle, caption = caption, : object 'params' not found
I've reproduced this on two machines, both running Windows 10H2 and R 4.0.3. One has RStudio 1.3, the other has RStudio 1.4 Preview.
This is my YAML header:
---
title: "COVID-19 stats for Dallas and Texas"
params:
use_cache: TRUE
produced_by: "produced by Aren Cambre"
output:
html_document:
df_print: paged
toc: true
---
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included 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').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
I am now getting this same problem if I run knit2wp() from an R script from within RStudio. Between this time and the last time I successfully ran my script (from within RStudio), the only change is I upgraded to the latest versions of these packages:
rlang 0.4.10
cowplot 1.1.1
ggplot2 3.3.3
data.table 1.13.6
Only ggplot2 is explicitly used by my script. I am almost certain cowplot is not used. If rlang and data.table are used, it would only be reference.
For now, my workaround is to manually create a params list:
I have an R script that contains this command:
The Rmd file has many plots, and the
subtitle
field of each uses a parameter.When I run that script from RStudio, it works fine. The page looks fine.
When I run that script from the command prompt, using rscript.exe, every plot is substituted with this error text: ## Error in list2(..., title = title, subtitle = subtitle, caption = caption, : object 'params' not found
I've reproduced this on two machines, both running Windows 10H2 and R 4.0.3. One has RStudio 1.3, the other has RStudio 1.4 Preview.
This is my YAML header:
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.
The text was updated successfully, but these errors were encountered: