# NOT RUN {
# Create three graphs
graph_time_1 <-
create_graph(
graph_name = "graph_with_time_1") %>%
set_graph_time(
time = "2015-03-25 03:00",
tz = "GMT")
graph_time_2 <-
create_graph(
graph_name = "graph_with_time_2") %>%
set_graph_time(
time = "2015-03-26 03:00",
tz = "GMT")
graph_time_3 <-
create_graph(
graph_name = "graph_with_time_3") %>%
set_graph_time(
time = "2015-03-27 15:00",
tz = "GMT")
# Create an empty graph series and add
# the graphs
series_temporal <-
create_series(series_type = "temporal") %>%
add_to_series(graph_time_1, .) %>%
add_to_series(graph_time_2, .) %>%
add_to_series(graph_time_3, .)
# Subset graph series by sequence
series_sequence_subset <-
subset_series(
graph_series = series_temporal,
by = "number",
values = 2)
graph_count(series_sequence_subset)
#> [1] 1
# Subset graph series by date-time
series_time_subset <-
subset_series(
graph_series = series_temporal,
by = "time",
values = c("2015-03-25 12:00",
"2015-03-26 12:00"),
tz = "GMT")
graph_count(series_time_subset)
#> [1] 2
# }
Run the code above in your browser using DataLab