check_key | R Documentation |
When creating a cubble from separate spatial and temporal component,
make_cubble()
will informed users about potential disagreement
of the key values in the two datasets (some sites appear in one table
but not the other). This function summarises the key values into those
match, potentially can be matched, and can't be matched.
check_key(spatial, temporal, by = NULL)
spatial |
a tibble object or an sf object, the spatial component
containing the |
temporal |
a tibble object or a tsibble object, the temporal component
containing the |
by |
in the syntax of the |
a list with three elements: 1) paired: a tibble of paired ID from spatial and temporal data, 2) potential_pairs: a tibble of pairs that could potentially match from both datasets, 3) others: other key values that can't be matched in a list: others$temporal and others$spatial
check_key(stations, meteo)
# make_cubble() will prompt to use check_key if there are key mis-match:
colnames(lga) <- c("lga", "geometry")
cb <- make_cubble(spatial = lga, temporal = covid)
(check_res <- check_key(lga, covid))
make_cubble(spatial = lga, temporal = covid, potential_match = check_res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.