X.DONG
X.DONG

Reputation: 1

Why the chunk could be run but there is an error when I knit in r-markdown?

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.

The capture of the error

Upvotes: 0

Views: 739

Answers (1)

user2554330
user2554330

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

Related Questions