For the kind of substitutions you want, just do things like
newlist <- tmp_test
newlist[newlist == tmp_test[2]] <- tmp_test[1]
Duncan Murdoch
However, here is what I found when I attempted to use grep and gsub:
tmp_test<-c("House 1 Plot Plus +100","House 2 Plot Plus +100","House 3
Plot Plus -100","House 4 Plot Plus -100","House 1 Plus +100","House 2 Plus
+100","House 3 Plus -100","House 4 Plus -100")
gsub(tmp_test[2], tmp_test[1], tmp_test)
[1] "House 1 Plot Plus +100" "House 2 Plot Plus +100" "House 3 Plot Plus
-100" "House 4 Plot Plus -100" "House 1 Plus +100" "House 2 Plus +100"
[7] "House 3 Plus -100" "House 4 Plus -100"
grep(tmp_test[1],tmp_test)
gsub(tmp_test[3], tmp_test[1], tmp_test)
[1] "House 1 Plot Plus +100" "House 2 Plot Plus +100" "House 1 Plot Plus
+100" "House 4 Plot Plus -100" "House 1 Plus +100" "House 2 Plus +100"
[7] "House 3 Plus -100" "House 4 Plus -100"
Thanks for any feedback that can be provided.