Markdown

Unless you have been living on the moon, or have jointed the Empire , you know that I’ve been using R Markdown for just about everything.

What’s in a Name?

Markdown was created as an alternative to Markup. In other words, it is meant for non-native html users to be able to ‘break in’ to environments rendered in html. How? By providing a set of macros that allow frequently used html statements to be rendered. Having said this, you don’t have to use Markdown. You can provide html commands in the document, and they will be passed directly through. This will be important in the bottom section.

Python

Did you know that you can run Python from R Markdown? Instead of declaring a code chunk with r, such as {r mycode}, you can declare it like this: {python myOtherCode}

x = 'hello, python world!'
print(x.split(' '))
## ['hello,', 'python', 'world!']

Bonus: Font-Awesome

Woah! Did you catch the Empire icon in the opening paragraph? If you haven’t seen FontAwesome, you really should check it out. Like everything else in R, the licence fee is learning how to connect it all together. In this document, the following has to be added to Yaml (aka the preamble):

output: html_document: css: font-awesome-4.6.3/css/font-awesome.css self_contained: yes

And you have to have fontAwesome installed in that path. Then you use html tags to address, like <i class="fa fa-first-order fa-2x"></i>, which renders as , for all you fans of Kylo Ren.

Till next time, may the Awesome be with you: