quarto-dev / quarto-dev/quarto-cli
Figures produced by R chunks in projects do not freeze if the filename has spaces
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When I use the global freeze: auto setting on a website project, figures produced in R code cells (via ggplot2) are not being stored in _freeze if the .qmd filename has spaces. They are going to _site (on an initial render), but because they're not in _freeze, when I re-render without making changes there are no longer any images to pull into _site and the figures break.
To be clear, I'm running
quarto render
quarto render
This isn't happening with Python chunks or non-project renders.
My current workaround is obviously to remove spaces from filenames. But ideally this behaviour would be consistent with non-project renders and Python chunks.
Steps to reproduce
In _quarto.yml
project:
type: website
render:
- "a test.qmd"
website:
navbar:
left:
- text: "a test"
href: "a test.qmd"
execute:
freeze: auto
In a test.qmd
```{r}
library(ggplot2)
ggplot(msleep,
aes(x = conservation)) +
geom_bar()
```
Actual behavior
Figures produced by R code in .qmd files within a project do not get frozen even when freeze: auto (or freeze: true)
Expected behavior
Figures produced in R chunks within project qmds should be stored in the _freeze directory when appropriate, even if the filename has spaces.
Your environment
- Bash terminal in VSCode
- Ubuntu 22.04.5 LTS (via WSL 2)
Quarto check output
Quarto 1.8.26
[✓] Checking environment information...
Quarto cache location: /home/uqcwest5/.cache/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.6.3: OK
Dart Sass version 1.87.0: OK
Deno version 2.3.1: OK
Typst version 0.13.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.8.26
Path: /opt/quarto/bin
[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)
[✓] Checking LaTeX....................OK
Using: Installation From Path
Path: /usr/bin
Version: 2021
[✓] Checking Chrome Headless....................OK
Chrome: (not detected)
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.10.12
Path: /usr/bin/python3
Jupyter: 5.9.1
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.5.2
Path: /usr/lib/R
LibPaths:
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
knitr: 1.50
rmarkdown: 2.30
[✓] Checking Knitr engine render......OK
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce with _quarto.yml and a test.qmd, running quarto render twice; compare _freeze and _site for the R figure, then compare with Python or a filename without spaces. Done when the R figure from a spaced filename is retained in _freeze and remains available in _site on the second render.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, r
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100