Skip to content

Instantly share code, notes, and snippets.

#------------------------------------------------------------
# REVOLUTION ANALYTICS WEBINAR: INTRODUCTION TO R FOR DATA MINING
# February 14, 2013
# Joseph B. Rickert
# Technical Marketing Manager
#
# BIG DATA with RevoScaleR
#
# Copyright: Revolution Analytics
#------------------------------------------------------------
# REVOLUTION ANALYTICS WEBINAR: INTRODUCTION TO R FOR DATA MINING
# February 14, 2013
# Joseph B. Rickert
# Technical Marketing Manager
#
# BIG DATA with RevoScaleR
#
# Copyright: Revolution Analytics
jekyll

Building a beamer presentation with knitr.

Introduction

The documents included are the input for knitr. In addition you need to have the tool pandoc installed. I also use a custom beamer template to add the University of Utah \institute command to the template. It also changes the indentation some.

Steps

  1. knit document with
#解决安装Pygments后出现Liquid error: bad file descriptor的问题
diff --git a/lib/albino.rb b/lib/albino.rb
index 387c8e9..b77d55e 100644
--- a/lib/albino.rb
+++ b/lib/albino.rb
@@ -1,4 +1,5 @@
require 'posix-spawn'
+require 'rbconfig'
##
@yanping
yanping / jsonball.rb
Created October 15, 2012 01:24 — forked from ahgittin/jsonball.rb
a jekyll tag to parse json files and objects for use as maps subsequently
require 'json'
# JSON parser tag, creating map for use in jekyll markdown
# Alex.Heneveld @ Cloudsoft Corp (remove spaces and add the .com)
# Released under APL 2.0
# usage: {% jsonball varname from TYPE PARAM %}
#
# where TYPE is one of {data,var,file,page}, described below
@yanping
yanping / excerpt.rb
Created October 14, 2012 16:14 — forked from stympy/excerpt.rb
Jekyll excerpt plugin
# This goes in _plugins/excerpt.rb
module Jekyll
class Post
alias_method :original_to_liquid, :to_liquid
def to_liquid
original_to_liquid.deep_merge({
'excerpt' => content.match('<!--more-->') ? content.split('<!--more-->').first : nil
})
end
end
@yanping
yanping / generate_archives.rb
Created October 14, 2012 16:13 — forked from stympy/generate_archives.rb
Archive generator plugin for jekyll
# Jekyll archive page generator with pagination.
#
# Based on the category generator from
# http://recursive-design.com/projects/jekyll-plugins/,
# which is copyright (c) 2010 Dave Perrett,
# http://recursive-design.com/ and is licensed under the MIT
# license (http://www.opensource.org/licenses/mit-license.php), and
# on the pagination code from Jekyll itself.
#
# This code is copyright (c) 2011 Benjamin Curtis, and is licensed
@yanping
yanping / test.R
Created October 1, 2012 06:24 — forked from nanxstats/test.R
R Code for Reading HTML Tables with XML
require(XML)
pg1 = 'http://www.wxtj.gov.cn/tjxx/tjsj/ydzyzb/index.shtml'
pg2 = 'http://www.wxtj.gov.cn/tjxx/tjsj/ydzyzb/index_2.shtml'
pg3 = 'http://www.wxtj.gov.cn/tjxx/tjsj/ydzyzb/index_3.shtml'
pg4 = 'http://www.wxtj.gov.cn/tjxx/tjsj/ydzyzb/index_4.shtml'
url1 = htmlTreeParse(pg1, useInternal = TRUE)
url2 = htmlTreeParse(pg2, useInternal = TRUE)
url3 = htmlTreeParse(pg3, useInternal = TRUE)
@yanping
yanping / _config.yml
Created January 21, 2012 14:45 — forked from davefearon/_config.yml
Jekyll + Liquid + pagination = win!
paginate: 5