-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new arg key_use in make_cubble() for potential_match
- Loading branch information
1 parent
b0996f4
commit 7b33173
Showing
6 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
check_key_tbl <- function(obj){ | ||
if (!inherits(obj, "key_tbl")){ | ||
cli::cli_abort( | ||
"The {.field obj} need to be the result from {.fn check_key}.") | ||
} | ||
|
||
} | ||
|
||
|
||
check_arg_key_use <- function(arg){ | ||
if (!arg %in% c("spatial", "temporal")){ | ||
cli::cli_abort( | ||
"The {.field key_use} need to be either 'spatial' or 'temporal'.") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# make cubble with partial match | ||
|
||
Code | ||
dplyr::pull(make_cubble(lga2, covid2, potential_match = check_res), lga) | ||
Warning <simpleWarning> | ||
st_centroid assumes attributes are constant over geometries | ||
Warning <lifecycle_warning_deprecated> | ||
Using an external vector in selections was deprecated in tidyselect 1.1.0. | ||
i Please use `all_of()` or `any_of()` instead. | ||
# Was: | ||
data %>% select(by) | ||
# Now: | ||
data %>% select(all_of(by)) | ||
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>. | ||
Output | ||
[1] "Kingston (C)" "Latrobe (C)" | ||
|
||
--- | ||
|
||
Code | ||
dplyr::pull(make_cubble(lga2, covid2, potential_match = check_res, key_use = "spatial"), | ||
lga) | ||
Warning <simpleWarning> | ||
st_centroid assumes attributes are constant over geometries | ||
Warning <lifecycle_warning_deprecated> | ||
Using an external vector in selections was deprecated in tidyselect 1.1.0. | ||
i Please use `all_of()` or `any_of()` instead. | ||
# Was: | ||
data %>% select(by) | ||
# Now: | ||
data %>% select(all_of(by)) | ||
See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>. | ||
Output | ||
[1] "Kingston (C) (Vic.)" "Latrobe (C) (Vic.)" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters