This demo shows you how to merge the source and output blocks in markdown output. Note knitr puts R source and output in separate blocks by default.

a = 1
a
b = 1:10
write(b, '')

See if the chunk option collapse works:


Source and output lived together happily ever in knitr.



Try the parsermd package in your browser

Any scripts or data that you put into this service are public.

parsermd documentation built on May 20, 2021, 5:08 p.m.