I have a column that has value which look similar to this:
data.reg2$dummy.DR58
In every row, I want to find "data.reg2$" and replace it with "beta." - all rows have that data.reg2 at the beginning.
I've tried a bunch of variations of gsub, etc., but nothing is actually doing the replacement for some reason. This is the code I currently have (which isn't working):
cluster.model <- gsub('data.reg2$', 'beta.', cluster.model$betas)
Any thoughts?