ggcal: Given dates and a fill variable, generate a calendar plot

Description Usage Arguments Details Note Examples

Description

Given a collection of dates and values for each date, this will generate a calendar for each month in the range of dates. This will generate complete calendar months, so there is no need to fill in any missing dates or anything.

Usage

1
ggcal(dates, fills)

Arguments

dates

vector of Date values

fills

vector of values to map onto the fill aesthetic

Details

Note that the ggplot2 object returned will not have any scale defined for the fill, so that can be added to the returned ggplot2 object.

Note

If the dates span multiple years, the year will be appended to the month name automatically, otherwise, it will not appear.

Examples

1
2
3
4
5
6
{
mydate <- seq(as.Date("2017-02-01"), as.Date("2017-07-22"), by="1 day")
myfills <- rnorm(length(mydate))

print(ggcal(mydate, myfills))
}

jayjacobs/ggcal documentation built on May 18, 2019, 5:57 p.m.