library(knitr)
engine_output(opts_chunk$merge(list(engine = "Rscript")),
code = "1 + 1", out = "[1] 2")
engine_output(opts_chunk$merge(list(echo = FALSE, engine = "Rscript")),
code = "1 + 1", out = "[1] 2")
# expert use only
engine_output(opts_chunk$merge(list(engine = "python")),
out = list(structure(list(src = "1 + 1"), class = "source"),
"2"))
Run the code above in your browser using DataLab