Skip to content

Instantly share code, notes, and snippets.

View Choens's full-sized avatar

Choens Choens

  • Upstate New York
View GitHub Profile
@Choens
Choens / Choropleth-1.R
Created November 5, 2010 17:04
An example choropleth map using map() in R.
# Draw a basic choropleth map, using R.
# This example creates a map of the United States, based on completely
# fictional information. Since we just survived an election, I used red and
# blue as my color choices.
library(maps)
library(mapdata)
# If either library() call fails, try these.
@Choens
Choens / RandomFlowerDay.R
Created November 8, 2010 21:19
Creates a vector of random dates. On these dates, you should buy someone flowers.
# ==============================================================================
# RandomFlowerDay.R
# Calculates 12 "random" days/year, to buy flowers for your special someone.
# Output is in mm/dd/yy
#
# Dependencies - Uses awk to pre-process system information. Should work on
# andy POSIX compatible system. Requires r-base only.
#
# Includes a set of tests. I'm still learning how to properly build Unit Tests
# in R. In the meantime, these will do the trick nicely.