'Substitute string in whole code below - Rstudio

I have a code:

Rstudio Code:

tt0 <- mean(tab[tab$Treatment == 1 & tab$Event == 0, 23])
tt1 <- mean(tab[tab$Treatment == 1 & tab$Event == 1, 23])
rt1 <- mean(na.omit(tab[tab$Treatment == 1 & tab$Event == 1, 15]))
rt0 <- mean(na.omit(tab[tab$Treatment == 1 & tab$Event == 0, 15]))
rt1 <- mean(na.omit(tab[tab$Treatment == 1 & tab$Event == 1, 15]))
mt1 <- mean(tab[tab$Treatment == 1 & tab$Event == 1, 21])
mt0 <- mean(tab[tab$Treatment == 1 & tab$Event == 0, 21])

Now, let's say that I want to substitute a string "tabrob" in place of everywhere you see "tab" in the code, how can I do that?



Solution 1:[1]

In RStudio go to search tab. give in: tab to find and tabrob to replace then click All enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 TarJae