Skip to content

Sharing R environment between book chapters  #1590

Open

Description

I'm playing with Quarto Books for the first time having been a R/bookdown user for a while. I have a simple book with two chapters. In the first chapter I define a variable , x, and I want to then use x in my second chapter. In bookdown this works fine. But with Quarto I get, "Error in eval(expr, envir, enclos) : object 'x' not found" when I click render in RStudio. I'm very willing to accept user error, or that independence of chapters is a design choice. But it wasn't something I was expecting.

I've attached a worked example.

What I'm actually more interesting in working out is how to pass params (from a YAML header) from chapter to chapter. Previously I could include something like this in the index file:

---
params:
  hello: world
---

and then access it in all other chapters
test_params_quorto.zip
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions