Skip to content
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

in pm_prep(), limit forward-slash replacement to intersection-type addresses #29

Open
christopeak opened this issue Jun 12, 2023 · 0 comments · May be fixed by #30
Open

in pm_prep(), limit forward-slash replacement to intersection-type addresses #29

christopeak opened this issue Jun 12, 2023 · 0 comments · May be fixed by #30

Comments

@christopeak
Copy link

Current problem:
Currently, pm_prep() replaces forward-slashes with the string "at" in all addresses, even though this logic seems intended for intersection-types only.

Desired solution:
Suppress the forward-slash replacement logic for "street"-type addresses.

reprex:
As shown below, the address "10/20 Main Street" gets changed to "10 at 20 Main Street":

library(postmastr)

df <- data.frame(my.address = "10/20 Main Street, Seattle, Washington")

df_ident <- pm_identify(df, 
                        var="my.address", 
                        locale="us")

df_min <- pm_prep(df_ident, 
                  var="my.address", 
                  type = "street")

str(df_min)
#> tibble [1 × 2] (S3: tbl_df/tbl/data.frame)
#>  $ pm.uid    : int 1
#>  $ pm.address: chr "10 at 20 Main Street Seattle Washington"

Describe alternatives you've considered
None, I have to admit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant