knitr - R markdown: Accessing variable from code chunk (variable scope) -


in r markdown (knitr package), can access variable within body of document calculated in code chunk?

yes. can call evaluated variable inline.

e.g. if had created data.frame in chunk df <- data.frame(x=1:10)

`r max(df$x)` 

should produce

10 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

javascript - Preserving URL fragment through CAS sign-on -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -