This is a simple stupid test put together to explain what was happening with my code. Why does replace
simply spit back what is fed into it instead of actually replacing the content? It is because of this unexpected behavior that I am now using gsub
instead.
Examples:
> replace(x="cat", "a", "o")
a
"cat" "o"
> gsub("a", "o", "cat")
[1] "cot"