\begin{Schunk}
\begin{Sinput}
 library(kutils)
 target <- paste0(state.name, "$")
 mgsub(target, state.abb, cities)
\end{Sinput}
\begin{Soutput}
 [1] "Dallas TX"                "Denver CO"                "Austin TX"               
 [4] "Salem OR"                 "Salem MA"                 "California PA"           
 [7] "Long Beach CA"            "San Francisco CA"         "Texas MO"                
[10] "Nevada MO"                "St. Louis MO"             "Truth or Consequences NM"
[13] "Charleston SC"            "Charleston NC"           
\end{Soutput}
\end{Schunk}
