在下面的整个代码中替换字符串 - Rstudio
Substitute string in whole code below - Rstudio
我有一个代码:
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])
现在,假设我想用字符串 "tabrob"
代替您在代码中看到的任何地方 "tab"
,我该怎么做?
在 RStudio 中转到搜索选项卡。给出:tab
查找和 tabrob
替换然后单击 All
我有一个代码:
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])
现在,假设我想用字符串 "tabrob"
代替您在代码中看到的任何地方 "tab"
,我该怎么做?
在 RStudio 中转到搜索选项卡。给出:tab
查找和 tabrob
替换然后单击 All