Saturday, April 13, 2013

RG#57: Heatmap plot of calender


 # data               
st <- as.Date("2010-2-17")
en <- as.Date("2013-4-7")
datell <- seq(st, en, "1 day")
myd <- data.frame (date1 = datell, heatvar = rnorm (length (datell), 50, 20))


# plot 
# using function written by Paul Bleicher
# requires lattice, chron, grid packages 

require(lattice)
require(chron)
require(grid)

source ("http://blog.revolution-computing.com/downloads/calendarHeat.R")
                
calendarHeat(myd$date1, myd$heatvar, varname="VAR name")






calendarHeat(myd$date1, myd$heatvar, varname="VAR name", ncolors=99,color="r2b" )







No comments:

Post a Comment

Note: Only a member of this blog may post a comment.