One option is, of course, not to knit it
(you can just run the code chunks as you go, I guess). If you're looking to set an option for the whole document, you can do so in that initial setup chunk. I'm not totally clear on the use case, but if you don't want the code evaluated, you'd use eval = FALSE (see chunk options in the knitr docs).
```{r setup}
knitr::opts_chunk$set(eval = FALSE)
```
You might also consider using notebooks, but, again, I'm not 100% sure how you want to use this, so I'm not sure.