Skip to content

Instantly share code, notes, and snippets.

@jessykate
jessykate / Jekyll nd Octopress Liquid tag for MathJax.rb
Created February 18, 2011 23:37
A simple liquid tag for Jekyll/Octopress that converts {% m %} and {% em %} into inline math, and {% math %} and {% endmath %} into block equations, by replacing with the appropriate MathJax script tags.
module Jekyll
class MathJaxBlockTag < Liquid::Tag
def render(context)
'<script type="math/tex; mode=display">'
end
end
class MathJaxInlineTag < Liquid::Tag
def render(context)
'<script type="math/tex">'
end
@steadyfish
steadyfish / dplyr_functions_programmatic_use.R
Last active October 12, 2020 09:27
using dplyr functions programmatically
# using dplyr finctions in non-interactive mode
# examples
library(plyr)
library(dplyr)
d1 = data_frame(x = seq(1,20),y = rep(1:10,2),z = rep(1:5,4))
head(d1)
#### single table verbs ####