Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

Keeping R Markdown syntax highlighting when printing

After doing your 'Knit' to your original example.Rmd you will have an example.md in your working path, then use pandoc...

# for pdf (you need to have latex installed)
system( "pandoc example.md -o example.pdf")

# for syntax-highlight persistant html
system("pandoc example.md -o example.html -s -S")

Tags:

Markdown

R

Rstudio

Knitr

Related

What is a context? What is the difference between git am and git apply? what's the correct way to send a file from REST web service to client? How can I add files to a Jar file? Why should I not use equals with inheritance? How to select records without duplicate on just one field in SQL? Footer at bottom of page or content, whichever is lower Getting started with speech recognition and python Find WPF control by Name Determine command line working directory when running node bin script LinqPad - Convert SQL to Linq command How to disable Google translate from HTML in Chrome

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy