Skip to content

Instantly share code, notes, and snippets.

@daroczig
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daroczig/8855371 to your computer and use it in GitHub Desktop.
Save daroczig/8855371 to your computer and use it in GitHub Desktop.
> library(pander)
> str(Pandoc.brew(text='Pi equals to <%=pi%>.\nAnd here are some random data:\n<%=runif(10)%>'))
Pi equals to _3.142_.
And here are some random data:
_0.9281_, _0.7048_, _0.5285_, _0.469_, _0.4796_, _0.844_, _0.2564_, _0.8511_, _0.5924_ and _0.8484_
List of 3
$ :List of 4
..$ type : chr "text"
..$ text :List of 2
.. ..$ raw : chr "Pi equals to <%=pi%>.\nAnd here are some random data:\n"
.. ..$ eval: chr "Pi equals to _3.142_.\nAnd here are some random data:\n"
..$ chunks:List of 2
.. ..$ raw : chr "<%=pi%>"
.. ..$ eval: chr "_3.142_"
..$ msg :List of 3
.. ..$ messages: NULL
.. ..$ warnings: NULL
.. ..$ errors : NULL
$ :List of 2
..$ type : chr "block"
..$ robject:List of 6
.. ..$ src : chr "runif(10)"
.. ..$ result: num [1:10] 0.928 0.705 0.529 0.469 0.48 ...
.. ..$ output: chr "_0.9281_, _0.7048_, _0.5285_, _0.469_, _0.4796_, _0.844_, _0.2564_, _0.8511_, _0.5924_ and _0.8484_"
.. ..$ type : chr "numeric"
.. ..$ msg :List of 3
.. .. ..$ messages: NULL
.. .. ..$ warnings: NULL
.. .. ..$ errors : NULL
.. ..$ stdout: NULL
.. ..- attr(*, "class")= chr "evals"
$ :List of 4
..$ type : chr "text"
..$ text :List of 2
.. ..$ raw : chr "\n"
.. ..$ eval: chr "\n"
..$ chunks:List of 2
.. ..$ raw : NULL
.. ..$ eval: NULL
..$ msg :List of 3
.. ..$ messages: NULL
.. ..$ warnings: NULL
.. ..$ errors : NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment