Skip to content

Instantly share code, notes, and snippets.

@greghirson
greghirson / latticetips1.R
Created April 22, 2011 18:42
lattice tips 1
#Lattice plot of uc admission data, UCB vs. UCD
library(XML)
library(RCurl)
library(reshape2) #requires plyr
#statistics from UCOP
url= "http://statfinder.ucop.edu/library/tables/table_153.aspx"
@greghirson
greghirson / rainy-weather-CA.R
Created December 21, 2010 21:48
comparing Northern CA to Southern CA rain for week of Dec 14-21
library(plyr)
library(cimis)
library(lattice)
#get the data
x = mcimishourly(c(6, 99), label = "name")
#split to make cumsums
x2 = ddply(x, .(station),
@greghirson
greghirson / .Rprofile
Created December 6, 2010 20:08
my .Rprofile
.libPaths("~/Rpackages")
library(lattice)
library(XML)
library(RCurl)
library(RLastFM)
library(cimis)
options(error = recover, repos = "http://cran.cnr.Berkeley.edu")
# File-Name: currency_converter.R
# Date: 2009-11-17
# Author: Drew Conway
# Purpose: Convert currency data
# Data Used: vc_invests.csv
# Packages Used: foreign,XML
# Output File: vc_invests_USD.csv
# Data Output:
# Machine: Drew Conway's MacBook