2
votes

Is it possible to make each of the numbers show up on a separate page?

---
title: "Page Break In Chunk"
output: pdf_document
---
```{r}
for(i in c(1:10))
{
   print(i)
} 
```
1

1 Answers

4
votes

Just add a cat("\\newpage") and results = "asis":

---
title: "Page Break In Chunk"
output: pdf_document
---
```{r results = "asis"}
for(i in c(1:10))
{
   print(i)
   cat("\\newpage")
} 
```

Output (not sure if this is what you want):

output1