Ive been reading through the Rstudio Markdown tutorials trying to figure out how to do syntax highlighting on my code in a .rmd file, but cant figure it out. Anyone know how to do it? My output goal right now is .html, but that can change if needed. Thanks!
A small code snippet of what I tried. The page text works fine but the code does not highlight:
---
title: Eve Historical Market Analysis
author:
date: 12/3/18
output:
prettydoc::html_pretty:
theme: cayman
highlight: github
---
```
library(rmarkdown) #used for syntax highlighting in this document
library(shiny)
```
#read in file of item ids from website and parse
```
url = "http://eve-files.com/chribba/typeid.txt"
df = read_fwf(url, fwf_empty(url), skip = 2)
colnames = read_table(url, n_max = 1)
names(df) = names(colnames)

{r}right after the ```, or in your case{r, eval = FALSE}(see the fourth example at this page). I think Imran Ali's answer is exactly what you're looking for. - duckmayr