highr v0.7

0

Monthly downloads

0th

Percentile

Syntax Highlighting for R Source Code

Provides syntax highlighting for R source code. Currently it supports LaTeX and HTML output. Source code of other languages is supported via Andre Simon's highlight package (<http://www.andre-simon.de>).

Readme

highr

Build Status

This is an infrastructure R package for syntax highlighting. It supports LaTeX and HTML output. Not surprisingly, it works best with R code. It attaches markups onto source code, e.g., it turns

a <- 1 # something

into LaTeX code

\hlstd{a} \hlkwb{<-} \hlnum{1} \hlcom{\# something}

or HTML code

<span class="hl std">a</span> <span class="hl kwb">&lt;-</span> <span class="hl num">1</span> <span class="hl com"># something</span>

via

library(highr)
hi_latex("a <- 1 # something")
hi_html("a <- 1 # something")
# or hilight(code, format = "latex"/"html")

This package also has a wrapper function, hi_andre(), for Andre Simon's Highlight package.

There are a few package Markdown vignettes in this package:

browseVignettes(package = "highr")

To install the development version here, use

install.packages('highr', repos = 'http://rforge.net', type = 'source')

This package is licensed under GPL, and is supposed to serve other packages such as knitr.

Functions in highr

Name Description
hi_andre A wrapper to Andre Simon's Highlight
hilight Syntax highlight an R code fragment
No Results!

Vignettes of highr

Name
highr-custom.Rmd
highr-internals.Rmd
No Results!

Last month downloads

Details

Type Package
License GPL
URL https://github.com/yihui/highr
BugReports https://github.com/yihui/highr/issues
VignetteBuilder knitr
RoxygenNote 6.0.1
NeedsCompilation no
Packaged 2018-06-09 07:37:11 UTC; yihui
Repository CRAN
Date/Publication 2018-06-09 15:46:28 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/highr)](http://www.rdocumentation.org/packages/highr)