View source: R/preprocessing.R
divide_by_disconnection | R Documentation |
Divide sessions by disconnection day
divide_by_disconnection(
sessions,
division_hour,
start = getOption("evprof.start.hour")
)
sessions |
tibble, sessions data set in evprof standard format. |
division_hour |
Hour to divide the groups according to disconnection time |
start |
integer, start hour in the x axis of the plot. |
same sessions data set with extra column "Disconnection"
library(dplyr)
sessions_disconnection <- california_ev_sessions %>%
sample_frac(0.05) %>%
divide_by_disconnection(
start = 2, division_hour = 5
)
# The column `Disconnection` has been added
names(sessions_disconnection)
library(ggplot2)
sessions_disconnection %>%
tidyr::drop_na() %>%
plot_points() +
facet_wrap(vars(Disconnection))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.