-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for wru #140
Fix for wru #140
Conversation
@@ -42,7 +42,7 @@ map_interactive <- function(voter_file, | |||
latitude = "lat", | |||
longitude = "lon") { | |||
|
|||
if (class(voter_file) == "data.frame" & any(colnames(voter_file) == "geometry")) { | |||
if (is.data.frame(voter_file) & any(colnames(voter_file) == "geometry")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
# Use surname only | ||
if (surname_only) { | ||
new_voter_file <- data.frame(surname = surnames) | ||
# Calculate probabilities using surnames only | ||
probabilities <- suppressWarnings( | ||
wru::merge_surnames( | ||
merge_surnames_copy( | ||
voter.file = new_voter_file, | ||
surname.year = 2010, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May wish to make this a parameter given the new data for 2020 is widely available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
Thanks for opening a PR!
Please list any Issues this PR addresses
In 2-3 sentences or a brief list, describe changes implemented in this PR
wru
(NAMESPACE error kosukeimai/wru#70)wru
. If the user sets these toTRUE
, they will be warned and the values will be forced toFALSE
year
field