Skip to content

Instantly share code, notes, and snippets.

View tab114's full-sized avatar

Lefteris Nikolidakis tab114

View GitHub Profile
Storage.prototype.setObject = function(key, value) {
this.setItem(key, JSON.stringify(value));
}
Storage.prototype.getObject = function(key) {
var value = this.getItem(key);
return value && JSON.parse(value); //returns the
}
var userActionObject = "UserAction--TravelViewed",
if ($('.footer-author ul > li').length === 1) {
//If the '.footer-author ul > li' element exists in the article then
//if someone clicks on the '.byline__author-name a' link send events
$body.on('mousedown', '.byline__author-name a', function() {
methods.sendEvent('click__author-link');
methods.sendEvent('click__author-link--non-opinion');
});
} else if ($('.headline ul > li').length === 1) {
//If the '.headline ul > li' element exists in the article then
This post examines the features of [R Markdown](http://www.rstudio.org/docs/authoring/using_markdown)
using [knitr](http://yihui.name/knitr/) in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](http://stats.stackexchange.com/a/15006/183).
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.