Skip to content

Instantly share code, notes, and snippets.

@stla
Last active December 24, 2015 06:09
Show Gist options
  • Select an option

  • Save stla/6754920 to your computer and use it in GitHub Desktop.

Select an option

Save stla/6754920 to your computer and use it in GitHub Desktop.
Inline R code in a child file recursively called - See output at http://pagist.github.io/?6755031
Define `x`:
```{r}
x <- LETTERS[1:5]
i <- 1
```
```{r child, child="sub.Rmd"}
```
Current component of `x`:
```{r}
x[i]
```
```{r, echo=FALSE}
i <- i+1
```
```{r, child="sub.Rmd", eval=i<=5}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment