Skip to content

Instantly share code, notes, and snippets.

View codegordi's full-sized avatar

C M Gutierrez codegordi

View GitHub Profile
@codegordi
codegordi / convertCoordinates
Created October 5, 2012 21:48
a simple coordinate conversion function
### a simple coordinate conversion function to convert latitude, longitude in DMS to decimal-degress
### christina gutierrez aka github@codegordi
#library(gsubfn)
require(gsubfn)
options(digits=15)
# point.set == data set with at least latitute and longitude in degrees-(arc)minutes-seconds[-fractional seconds];
# no projection or datum assumed;
# format of DD[D]:MM:SS[*] is assumed
# e.g. coords <- c("122:45:45", "-69:38:27")
# e.g coords <- c("122:45:45.84", "-69:38:27.76")
@codegordi
codegordi / srapeshell.R
Created September 27, 2012 16:53 — forked from abelsonlive/srapeshell.R
# best practices for web scraping in R // ldply
# best practices for web scraping in R #
# function should be used with ldply
# eg:
ldply(urls, scrape)
# add a try to ignore broken links/ unresponsive pages
# eg: