-
DescriptionI am using quarto 1.3.450 with R on an M1 iMac (and MacBook Pro) and run
to render a report. But nobody is perfect, and some code chunks have errors, particularly in e.g. The question is: how can I see the output from e.g. I do not want to see them in the rendered Report itself (and the rendering should fail when an error occurs), but only in the terminal from where I run |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 10 replies
-
Could you share a small self-contained "working" (reproducible) example to work with, i.e., a complete Quarto document or a Git repository? Thanks. See the troubleshooting guide: https://quarto.org/docs/troubleshooting/index.html You can share a Quarto document using the following syntax, i.e., using more backticks than you have in your document (usually four ````qmd
---
title: "Reproducible Quarto Document"
format: html
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
plot(cars)
```
The end.
```` |
Beta Was this translation helpful? Give feedback.
-
Sorry - here it is: ---
title: "Reproducible Quarto Document"
format: html
---
This is a reproducible Quarto document using `format: html`.
It is written in Markdown and contains embedded R code.
When you run the code, it will produce a plot.
```{r}
message("I want to see this")
stop("And stop!")
```
The end.
```
And the output in the terminal is:
And I do not see the message "I want to see this" Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Hm. OK. I will use Thanks. |
Beta Was this translation helpful? Give feedback.
-
It seems that the quarto cell config option doesn't work anymore. i.e. The following code returns error when rendering.
Put the config in the {r} block still works. |
Beta Was this translation helpful? Give feedback.
@isaactpetersen Please avoid posting on old thread (open a new one referencing it as old thread usually contains outdated informations), especially if you don't specify the Quarto CLI version being used.
You are either not using the latest version of
knitr
and/or the latest stable version of Quarto CLI (1.7.32).Edit: actually you are using the correct version as it is stated in the error message that message expects "NA" not "!expr NA".
Field "message" has value !expr NA, which must instead be one of: `true`, `false`, `NA`
Note that the use of
!expr
is discouraged in most cases in Quarto CLI.And if you…