Skip to content

Instantly share code, notes, and snippets.

@mages
mages / mammaldataset.R
Created January 1, 2012 17:02 — forked from sckott/mammaldataset.R
Looking at the Weecology mammal dataset
# setwd("/Mac/R_stuff/Blog_etc/Mammal_Dataset")
# URLs for datasets
comm <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_communities.csv"
refs <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_references.csv"
sites <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_sites.csv"
spp <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_species.csv"
trap <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_trapping.csv"
# read them
@mages
mages / mammaldataset.R
Created January 1, 2012 17:02 — forked from sckott/mammaldataset.R
Looking at the Weecology mammal dataset
# setwd("/Mac/R_stuff/Blog_etc/Mammal_Dataset")
# URLs for datasets
comm <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_communities.csv"
refs <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_references.csv"
sites <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_sites.csv"
spp <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_species.csv"
trap <- "http://esapubs.org/archive/ecol/E092/201/data/MCDB_trapping.csv"
# read them
@mages
mages / kmeans_palette.R
Created November 27, 2012 22:16 — forked from dsparks/kmeans_palette.R
Image Manipulation of the Lloyd's Building
library("ReadImages")
url <-"http://upload.wikimedia.org/wikipedia/commons/6/6a/6414A_1_copy.jpg"
download.file(url, "tempPicture.jpg", mode = "wb") # Stash image locally
readImage <- read.jpeg("tempPicture.jpg")
dm <- dim(readImage)
rgbImage <- data.frame(