I have the following vector:
tmp3 <- c(\"1500 2\", \"1500 1\", \"1510 2\", \"1510 1\", \"1520 2\", \"1520 1\", \"1530 2\",
\"1530 1\", \"1540 2\", \"1540
It depends a little bit on how closely your actual data matches the example data you've given. I you're just trying to get everything after the space, you can use gsub:
gsub(".+\\s+", "", tmp3)
[1] "2" "1" "2" "1" "2" "1" "2" "1" "2" "1"
If you're trying to implement a rule more complicated than "take everything after the space", you'll need a more complicated regular expresion.