Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there an error when I restart my Rstudio after updating rmarkdown package?

After installing package "rmarkdown", if I close Rstudio without closing each opened tab, and then restart Rstudio again, this error message will appear:

Error in .rs.parsePackageDependencies(contents, extension) : 
  object 'partition_yaml_front_matter' not found
Error in .rs.parsePackageDependencies(contents, extension) : 
  object 'partition_yaml_front_matter' not found

It appeared twice since I have three tab opened before I close Rstudio, so when I restart Rstudio again, three tab will open automatically, but two error like above appear. If I remove package "rmarkdown", the errors will disappear under the same operation. Why?

sessionInfo()

R version 4.2.1 (2022-06-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 20.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.9.0
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.9.0

locale:
 [1] LC_CTYPE=en_AU.UTF-8       LC_NUMERIC=C               LC_TIME=en_AU.UTF-8        LC_COLLATE=en_AU.UTF-8    
 [5] LC_MONETARY=en_AU.UTF-8    LC_MESSAGES=en_AU.UTF-8    LC_PAPER=en_AU.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_AU.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rmarkdown_2.14.3

loaded via a namespace (and not attached):
 [1] compiler_4.2.1  fastmap_1.1.0   cli_3.3.0       htmltools_0.5.2 tools_4.2.1     rstudioapi_0.13
 [7] yaml_2.3.5      knitr_1.39      xfun_0.31       digest_0.6.29   rlang_1.0.3     evaluate_0.15  
like image 568
zong Avatar asked Nov 18 '25 11:11

zong


2 Answers

There is a hot discussion on solutions here. For example, a good idea from kevinushey:


You could do something like the following:

options(rstudio.errors.suppressed = FALSE) options(error = recover) and then see if you can get the R debugger to "catch" the error, and introspect a bit more on the call stack / state of the rmarkdown package / other poking at the problem.


I second these observations. I also noticed that if you're running a r markdown notebook, it can't generate the .nb.html anymore.

Potential solution: Create a new RStudio project,

Create an R Markdown document and save it,

Create an R Notebook and save it,

Re-open the project. For me, the error only seems to occur if I have two documents open in the session.

like image 94
Alexander Shemetev Avatar answered Nov 20 '25 01:11

Alexander Shemetev


i've kept an Rmd file opened while closing rstudio. when i closed the file before closing rstudio and then restarted rstudio, the message disappeared

like image 32
islam muhammad Avatar answered Nov 20 '25 01:11

islam muhammad



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!