Skip to content

Instantly share code, notes, and snippets.

@ryanbriones
ryanbriones / intro_r_tutorial.md
Created August 10, 2012 02:22 — forked from jpvelez/intro_r_tutorial.md
Intro to R Tutorial

WHAT IS THIS?

This is a step-by-step tutorial for getting started with R, a powerful programming language for data analysis and visualization. It is aimed at near complete beginners. You'll basically want to be comfortable with spreadsheets and with using your computer's command line.

I slapped this together quickly, so expect some weirdness. Feel free to email me with comments or questions at jpvelez | at | gmail.com

I learned the following stuff using the UCLA Statistic's Department great R tutorials, so check those out:

Username = <%= @var %>
class Company < ActiveRecord::Base
has_many :employees
end
class Employee < ActiveRecord::Base
has_one :position
belongs_to :company
end
class Position < ActiveRecord::Base
class WrappedError < StandardError
attr_reader :original_error, :message_with_original_error
def initialize(original_error = nil)
@original_error = original_error
end
def message
heroku config --long | ruby -pe "\$_ = \$_.gsub(/(\w+)\s+=> (.+)/, 'export \1=\2')" > /tmp/$$ && source /tmp/$$; rm /tmp/$$
def mask(x)y=x.dup;y[6,6]='*'*6;y;end
var Timezone = {
set : function() {
var date = new Date();
date.setTime(date.getTime() + (1000*24*60*60*1000));
var expires = "; expires=" + date.toGMTString();
document.cookie = "timezone=" + (-date.getTimezoneOffset() * 60) + expires + "; path=/";
}
}
sys = require('sys')
for(var n in ["foo", "bar"]) {
sys.puts(n)
}
require 'lib/string_util.rb'
require 'singleton'
require 'rubygems'
require 'active_support/core_ext/class/attribute_accessors'
class Tokenizer
include Singleton
gemcutter => redis downloads spec
=================================
keys
----
downloads => global counter for all gem downloads
downloads:today => sorted set for downloads from today
downloads:rubygem:rails => counter for all rails downloads
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads