Displaying 1 result from an estimated 1 matches for "agency_match".
2011 Jun 14
1
Invalid Regular Expression
...or zip
code, and 0 if it doesn't.
Using the stringr package, I developed the following code:
library(stringr)
inscompany_match <- str_c(inscompany, collapse = "|")
state_match <- str_c(state, collapse = "|")
city_match <- str_c(city, collapse = "|")
agency_match <- str_c(agency, collapse = "|")
zipcode_match <- str_c(zipcode, collapse = "|")
mydf$inscompany <- as.numeric(str_detect(mydf$keyword, inscompany_match))
mydf$state <- as.numeric(str_detect(mydf$keyword, state_match))
mydf$city <- as.numeric(str_detect(mydf$k...