divide_by_timecycle {evprof} | R Documentation |
Divide sessions by time-cycle
Description
Divide sessions by time-cycle
Usage
divide_by_timecycle(
sessions,
months_cycles = list(1:12),
wdays_cycles = list(1:5, 6:7),
start = getOption("evprof.start.hour")
)
Arguments
sessions |
tibble, sessions data set in evprof standard format. |
months_cycles |
list containing Monthly cycles |
wdays_cycles |
list containing Weekdays cycles |
start |
integer, start hour in the x axis of the plot. |
Value
same sessions data set with extra column "Timecycle"
Examples
library(dplyr)
sessions_timecycles <- california_ev_sessions %>%
sample_frac(0.05) %>%
divide_by_timecycle(
months_cycles = list(1:12),
wdays_cycles = list(1:5, 6:7)
)
# The column `Timecycle` has been added
names(sessions_timecycles)
library(ggplot2)
plot_points(sessions_timecycles) +
facet_wrap(vars(Timecycle))
[Package evprof version 1.1.2 Index]