Web Hosted R Syntax Highlighter
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
highlight uses simple jquery command to syntax highlight R code contained in any regular More details is given at highlight’s page on how to use it on your own page.</code> element.</p>
<p>For example, this chunk of code, from the <a href="http://help.r-enthusiasts.com/library/datasets/html/cars.html">datasets::cars</a> help file.</p>
<pre>
require(stats); require(graphics)
plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)",
las = 1)
lines(lowess(cars$speed, cars$dist, f = 2/3, iter = 3), col = "red")
title(main = "cars data")
plot(cars, xlab = "Speed (mph)", ylab = "Stopping distance (ft)",
las = 1, log = "xy")
title(main = "cars data (logarithmic scales)")
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.