When trying to render a quarto presentation, whether from a terminal with quarto_render or by just clicking the render-icon in Rstudio, any object that is in the environment is not seen by quartro.
When using this code from the hello.qmd file by Quarto, it will render.
R objects need to be known and available from within the .qmd document itself. Quarto won't be able to render a document using R objects that lives in your current R session only.
Are you doing this in the .qmd file ?
If you created the object in a previous code block it should find it. If you created in your R session only, then the object does not exist when the document is rendered.
When rendering a document with quarto, it will run in an entire new external process which will call a new R process for each document of the project. This differs from R Markdown where all happen in R only.
@cderv Thanks! I have been working extensively wit Rmarkdown, bookdown, distill... So I was used to markdown being aware of the object in the R session.
Yes I understand completely. This is a big difference for R users. This is part why we are saying that that R Markdown is not going away: R Users will still have use cases and need a tool like R Markdown that is tied to the R language. This is one advantage that ends up being a limitation for broader usage in the scientific communication domain. Quarto is a tool that aims to reach broader that R only by not being tied with the R language if you don't need it - this comes with some limitation like this one.