Skip to content

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

Description

@christopeak

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions