-
-
Notifications
You must be signed in to change notification settings - Fork 972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R nb.html missing output when the output is shown inline in the RStudio #2504
Comments
Unfortunately without reproducible example, or at least a shared document or anything, it will be hard to help and look into this. Lots of things can happen, and it could be linked to some state of your local environment. You could try a whole new clean project in a new RStudio session to see if caching is the culprit here. Maybe starting fresh would solve it. If you have no specific error message or anything, I don't know what could happen. We need more to be able to start looking into this. |
@cderv, I didn't create a project in RStudio. I was just creating an R notebook. I'll try creating a project. If I start new it'll work but then after a while the same problem will happen. Let me think more on how to create a reproducible example. Forgot to mention, if I re-run the chunk, the figure will then appear in the preview. |
I don't know what RStudio IDE is really logging on that matter. When you press preview for a .Rmd with AFAIK notebooks works by running the preview, and then you need to execute the chunk interactively on the source mode. And when you save it will update the preview with the save content. So basically, the result of the interactive execution is saved (cached) locally by the IDE, and this is what is included in the preview. Preview for notebook is meant for rapid development, and so it does not render the document but use this trick. This means that first time you run preview, if you have run no chunk yet in the document, you will only see the text content in the HTML and no results. More on notebook at https://bookdown.org/yihui/rmarkdown/notebook.html
This lead me to believe this is a caching issue from the IDE. somehow the content of the chunk is seen as invalidating the result and you need to re-run the chunk interactively. This is how notebooks works as I explained above. |
Yeah, it does sound like it somehow didn't save (cache) the result of interactive execution by the IDE. Do you have any suggestion on what to check/fix for this cache issue from RStudio? Thanks! |
Unfortunately no. This could be a RStudio IDE related issue. Maybe you can try update to latest IDE if you are not using it already ? |
My RStudio is pretty new 2023.06.0 Build 421 but I'll try updating to the latest. |
It should be local to the project. If you could share a |
Sure. Thank you so much for helping me with this issue. Appreciate it! I am attaching my . atacseq_analysis_pax3foxo1_zebrafish.Rmd.txt atacseq_analysis_pax3foxo1_zebrafish.nb.html.txt This is the part in
I can see related files in cache directory but the dates are Aug 8. even though I rerun this part of code on Aug 22.
|
Did you try already what is mentioned in the documentation I linked previously ? https://bookdown.org/yihui/rmarkdown/notebook.html#chunk-output
|
I see in your Rmd source code that you get Did you try uncaching the chunk, or remove the knitr cache directory, or invalidate the cache (by modifiying the chunk a little). To be clear, knitr cache is different than internal caching from |
The plot I have in the Rmd file is showing in Rstudio as inline output:
But when I clicked on the preview button, the plot is missing.
Unfortunately, I am unable to create a reproducible example.
The text was updated successfully, but these errors were encountered: