I have a markdown document that is 5K lines long with many code chunks. I have specific code chunks in the middle of the document that I'd like to run. For example
One
Chunk one
print("chunk one")
Chunk two
print("chunk two")
Two
Chunk three
print("chunk three")
Chunk four
print("chunk four")
Three
Chunk five
print("chunk five")
Is there a way to execute just the chunks under the header #Two, or even chunks between the line X:Y that contain the chunks under the header #Two? I've tried hacking some things together with rstudioapi::executeCommand("executeNextChunk")
but that did not go smoothly.
Any advice would be greatly appreciated.