I would like to know if there is a shortcut to change the name of an object in Rstudio that appears multiple times in a script. For example, if I start with:
x*y
y <- x + 4
x <- x + y
This is just some meaningless code. Suppose I would like to have z instead of x :
z*y
y <- z + 4
z <- z + y
Is there a way of changing all the x to z silmultaneously , instead of one at the time? This would be very useful for longer scripts.
When you like to change x to z in Rstudio
Take care that you dont change, when the string is only part of other functions or variables