I need to parse through a list of addresses and remove the ones without street numbers or with PO boxes. I want to create a column, street number, that is just the numbers at the front of the string, and NA if it starts with letters. So for:
street<-c("123 fake st", "PO box 12", "fake st unit 2", "123 fake st apt 1")
I would want:
c(123, NA, NA, 123)
I see a lot of q&a's for subsetting numbers from a string, but I'm not sure how to do it without pulling in the numbers from the back end too.