### Bug description

**Description Issue Render Default R Quarto Document**

Render with yaml extension:
Format: html
Format: pdf

is failing when r code is included

When specifying 

Format: docx

it is rendering fine

---
The failed output is shown as:

```
> quarto::quarto_render('T0002.qmd')

Error in rmarkdown:::abs_path(input) :   
  The file 'T0002.qmd' does not exist.  
Calls: .main -> execute -> setwd -> dirname -> <Anonymous>  
Execution halted  
```

**Code Block:**

````
---
title: "T0002"
format: html
editor: visual
---

## Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

## Running Code

When you click the **Render** button a document will be generated that includes both content and the output of embedded code. You can embed code like this:

```{r}
1 + 1
```

You can add options to executable code like this

```{r}
#| echo: false
2 * 2
```

The `echo: false` option disables the printing of code (only output is displayed).
````


**End**



Rstudio IDE version:  RStudio 2022.07.1 Build 554


*** Running on Ubuntu 20.04 and on Windows 10

```
Microsoft Windows [Version 10.0.19042.1706]
(c) Microsoft Corporation. All rights reserved.

C:\Users\bert.Tijhuis>quarto check

[>] Checking Quarto installation......OK
      Version: 1.1.163
      Path: C:\R\Quarto\bin
      CodePage: 1252

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

[>] Checking Python 3 installation....OK
      Version: 3.10.2
      Path: C:/R/Python/Python310/python.exe
      Jupyter: 4.10.0
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........OK
      Version: 4.2.0
      Path: C:/R/R-4.2.0
      LibPaths:
        - C:/R/R-4.2.0/library
      rmarkdown: 2.14

[>] Checking Knitr engine render......OK


C:\Users\bert.Tijhuis>
```

### Checklist

- [X] 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.
cderv
2022-09-28T11:11:53Z
BertTijhuis
bug
v1.3
closed
Render Quarto with HTML or PDF failed in when codechunks with R code are included (Rstudio 2022.07.1 Build 554)
https://github.com/quarto-dev/quarto-cli/issues/2646