interlace | R Documentation |
The function "interlaces" the queries and combines their validity time axes (valid_from and valid_until) onto a single time axis.
interlace_sql()
is deprecated in favor of interlace()
interlace(tables, by = NULL, colnames = NULL)
interlace_sql(tables, by = NULL, colnames = NULL)
tables |
( |
by |
( |
colnames |
( |
The combination of input queries with a single, interlaced valid_from / valid_until time axis.
The combination of input queries with a single, interlaced valid_from / valid_until time axis
conn <- get_connection()
t1 <- data.frame(key = c("A", "A", "B"),
obs_1 = c(1, 2, 2),
valid_from = as.Date(c("2021-01-01", "2021-02-01", "2021-01-01")),
valid_until = as.Date(c("2021-02-01", "2021-03-01", NA))) |>
dplyr::copy_to(conn, df = _, name = "t1")
t2 <- data.frame(key = c("A", "B"),
obs_2 = c("a", "b"),
valid_from = as.Date(c("2021-01-01", "2021-01-01")),
valid_until = as.Date(c("2021-04-01", NA))) |>
dplyr::copy_to(conn, df = _, name = "t2")
interlace(list(t1, t2), by = "key")
close_connection(conn)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.