Mining
Mining

Reputation: 115

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?

Upvotes: 1

Views: 45

Answers (1)

TarJae
TarJae

Reputation: 78907

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

Upvotes: 2

Related Questions