Guest User

Untitled

a guest
Jun 20th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. address <- c("890 layton drive, wilmington de 19805",
  2. "227 weehawken place suite 145, comstock ny 78956",
  3. "13 airport highway, new castle de 19720",
  4. "3640 New Hampshire Ave NW Apt 207, Washington DC 20011").
  5.  
  6. sweet <- function(x) mapvalues(x, c("plaza", "street", "suite", "drive", "boulevard", "place",
  7. "south", "north", "west", "east", "square", "avenue", "road",
  8. "floor", "parkway", "circle", "highway"),
  9. c("plz", "st", "ste", "dr", "blvd", "pl",
  10. "s", "n", "w", "e", "sq", "ave", "rd",
  11. "flr", "pkwy", "cir", "hwy"))
  12.  
  13. address <- sapply(address, sweet)
Add Comment
Please, Sign In to add comment