Reputation: 1
Why can the chunk be run interactively but there is an error when I try to knit the file? When I run each chunk, there is no error, but when I knit it, it is stopped by an error.
Upvotes: 0
Views: 739
Reputation: 44788
The usual reason for a difference between the interactive result and the knitted document result is that you are referring to objects that aren't defined in the document. Interactive code can see your global environment, knitted code can't.
Upvotes: 1