### Bug description

# Main issue
1. **R location is not recognized** while rendering pdf in **VSCode with R** chunks.
2. It is okay if I run the command `quarto_render("~.qmd")` in R terminal in VSCode
3. it is can be partially rendered in Rstudio, Chinese letters are missing 
<img width="391" alt="截屏2022-12-16 21 40 03" src="https://user-images.githubusercontent.com/88379522/208110701-4c009328-0384-4a97-a058-0b0a5e584ba0.png">


```
(base) dzhou@bogon homework 1202 quarto % quarto preview "~.qmd" --to pdf --no-browser --no-watch-inputs

ERROR: Error executing '/Applications/R.app/Rscript': No such file or directory (os error 2)

Unable to locate an installed version of R.
Install R from https://cloud.r-project.org/
```

I do understand that rendering it in Rstudio is more acceptable, but **that can cause another problem, that Chinese letters are not fully rendered** (I'm sure that this can happen for all CJK in Rstudio rendering)

I guess this is a sort of command problem??? that you should only render it in R terminal if there are only R chunks??? I do have no idea for this, running statistics in R and Julia is my best.


# settings
- Quarto 1.2.269 in VSCode
- R 4.2.1, process ID 40651
- macOS Ventura 13.1 (22C65)

**Rstudio** RStudio 2022.07.1+554 "Spotted Wakerobin" Release (7872775ebddc40635780ca1ed238934c3345c5de, 2022-07-22) for macOS
Mozilla/5.0 (Macintosh; Intel Mac OS X 13_1_0) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.10 Chrome/69.0.3497.128 Safari/537.36

**VSCode** Version: 1.74.1 (Universal)
Commit: 1ad8d514439d5077d2b0b7ee64d2ce82a9308e5a
Date: 2022-12-14T10:33:40.793Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 22.2.0
Sandboxed: No


```
quarto check
[✓] Checking Quarto installation......OK
      Version: 1.2.269
      Path: /Applications/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.0
      Path: /usr/local/bin/python3
      Jupyter: 5.1.0
      Kernels: julia-1.6, julia-1.7, python3

(|) Checking Jupyter engine render....Traceback (most recent call last):
  File "/Applications/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/Applications/quarto/share/jupyter/notebook.py", line 16, in <module>
    import nbformat
ModuleNotFoundError: No module named 'nbformat'
[✓] Checking Jupyter engine render....OK
```

Best wishes

### Checklist

- [ ] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2022-12-16T13:41:03Z
DerekZ4471
bug
closed
R not located while rendering, Quarto VSCode, macOS Ventura
https://github.com/quarto-dev/quarto-cli/issues/3687