I have the same problem. It doesn't always occur, but quite frequently. Sometimes it opens up something like 20 tabs. My version is RStudio/2022.12.0+353 (and R version 4.2.2)
Here's an example of a code (I just ran this line using CTRL + ENTER, nothing else):
temp <- fu_data %>% filter (event = "1_year_fu")
(fu_data is my dataframe, event it's second column)
It opened 22 tabs (as if I've entered view(temp)
22 times). Very annoying.
Then I ran this:
atemp <- fu_data %>% filter (event = "1_year_fu")
No tabs were open.
Then I ran this:
temp <- fu_data %>% filter (event = "1_year_fu")
It opened 22 tabs.
Then I ran this:
atemp <- fu_data %>% filter (event = "1_year_fu")
No tabs were open.
I ran that line also directly in the Console and it also opened 22 tabs. When I renamed the variable from "temp" to "atemp" or even just "t", no tabs were open.
I ran
debugonce(view)
before and after runing
temp <- fu_data %>% filter (event = "1_year_fu")
and nothing happened. It didn't show any messages at all. Then I ran
debugonce(view)
view(temp)
And then something popped up. So I'm guessing that the bug doesn't run the view
function?
Also I noticed that if I leave the 20+ tabs open, no new tabs open. Actually, as soon as I have one temp
tab open, no new temp
tabs open. However, as soon as I run the mentioned code (with CTRL + ENTER or in the console), the tab jumps to the open temp
tab.
I often use "temp" as a variable to store items and I often have a problem of tabs opening up. For now, I'll rename all my temps to atemp as this seems to help