Skip to content

Can I Pass an Object to Next Exercise Chunk? #170

@dudrnjs1391

Description

@dudrnjs1391

I executed this code. But, All chunk Separated and cant't inherited from previous chunk.
Can I use the data from the previous chunk to the next chunk?

  • Make an Object and Check It
"```{r 2.1.data_create, exercise=TRUE}```"
"```{r 2.1.data_create-solution, exercise.setup="2.1.data_create-solution"}
tmp <- c(1,2,3)
```"
"```{r 2.2.data_plus, exercise=TRUE, ref.label="2.1.data_create-solution"}```"

"```{r 2.2.data_plus-solution}
tmp <- tmp+1
```"

the result will be tmp = 2,3,4


"```{r 2.3.data_plus_plus, exercise=TRUE, ref.label="2.2.data_plus-solution"}```"
"```{r 2.3.data_plus_plus-solution}
tmp <- tmp+2
tmp
```"

the result will be tmp = 4,5,6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions