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
Post a Comment