Skip to content

Setup chunks should be available to solutions #202

@matthew-brett

Description

@matthew-brett

We are writing a tutorial where the students are often, but not always using a data frame that should already be in the workspace. To do this, for the students' code, we have an exercise my-exercise that has exercise.setup="get-the-data", where get-the-data is a setup chunk that loads the data.

Of course the solution needs the same data, but it seems that adding exercise.setup="get-the-data" does not work as an option to my-exercise-solution.

I think the setup for the exercise should be available to the solution by default. At least, it should be possible to pass the setup to the solution code. Otherwise we have to replicate the setup in every solution chunk, which is bearable when the setup is minor, but very annoying when it becomes more complex.

See: alan-turing-institute/r-from-scratch#3 for discussion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions