ggblanket
ggblanket copied to clipboard
New feature: support datetime
lubridate::is.POSIXt
ggplot2::scale_x_datetime
Hi, thanks for the great package!! Is this feature coming anytime soon?
I'll aim to chuck datetime in version 1.5.0 @yogevherz
I assume hms class is less needed than datetime. This also has a few more complications with making it work. But datetime is fairly straightforward
datetime & hms are supported for x and y vars in the development version now.
Download from github to try it out.
Not sure whether I will get around to supporting datetime in col variables..
library(nycflights13)
library(tidyverse)
library(ggblanket)
flights_0101_0102 <-
nycflights13::flights %>%
filter(month == 1, day <= 2) %>%
group_by(time_hour = lubridate::floor_date(time_hour, "hour")) %>%
summarize(num_flights = n())
flights_0101_0102 %>%
gg_point(time_hour, num_flights) +
theme(axis.text.x = element_text(vjust = 1))
flights_0101_0102 %>%
gg_col(time_hour, num_flights) +
theme(axis.text.x = element_text(vjust = 1))
flights_0101_0102 %>%
gg_line(time_hour, num_flights) +
theme(axis.text.x = element_text(vjust = 1))
#218