Skip to content

Dataframe in external (pop-out) Viewer is reloaded when using console, and filtering is lost #15518

Open

Description

@TobyHooker

System details

RStudio Edition : Desktop
RStudio Version :   Desktop, version 2024.9.0.375, "Cranberry Hibiscus"
OS Version      :  Win11, platform: x86_64-w64-mingw32
R Version       :  4.4.1 "Race for Your Life"

Steps to reproduce the problem

Open a dataframe in an external viewer window. Use any code to read from the dataframe and the popped-out dataframe reloads with a pop-out warning ("Data Tables warning...") and halts, requiring user action before continuing. All dataframe filters are cleared. This also occurs even if a simple calculation is entered into the console (i.e. 2 + 2).

Describe the problem in detail

Greetings !

I use R-notebooks to help me clean datasets prior to database import. I usually have 1 or more data frames "open" (i.e. popped out and viewable in a separate window) while I go through my scripting template (which is an Rmd R-Notebook file).

The issue -- Currently, whenever I run a code-block (ctrl + shift + enter), the data frame in the pop-out window resets. This includes a resetting of any filters I had used in the data frame window.
Moreover, this occurs if I use the Console in any way (i.e. 2 + 2).
The effect also occurs if I run a portion of a code-block, or if I use the green "run" button.

Previously, something like this would occur ONLY IF I was re-writing to that popped out data frame, and I would get a pop-out warning, stating: "Data Tables warning: table id=rsGridData - Cannot reinitialize DataTable. For more information..."

Currently, I get this warning -multiple times- for even a simple line of code that does not write to the DF, e.g.:

EDD02 %>% {addmargins(table(.$PROJ_status, .$MPK_match, useNA="ifany", deparse.level = 2))}

What I expected -- I had assumed that when this occurred previously, it was because I was updating the data in the data frame, so the pop-out had to reset its view. However, I did not expect (nor had it happened previously, say before May 2024) that reading from the data frame or even typing in the Console would drive this behavior.

The current behavior is a bit of a problem, as I want/need to look at subsets of modestly-large data frames while I detect and correct particular types of errors in the sample data.

Question(s): Is there some way I can "fix" this or otherwise get back to the previous behavior? Are there other solutions to this issue? Does this occur for others ?

(Previously posted to posit.co: https://forum.posit.co/t/dataframe-in-external-pop-out-viewer-is-reloaded-when-using-console-and-filtering-is-lost/194812)

Update::

Using a CoPilot prompt, it was suggested to re-initialize the Rstudio profile (roughly: Username/AppData/Roaming/RStudio) as a way to fix the issue I described above.

This seems to have worked, but only temporarily. Not sure why or what part of that folder was corrupted...

...This was apparently only a temporary solution. Upon further work, the problem came back. Re-creating the Rstudio profile only worked for half a session before the behavior returned. Not sure how to continue.

Describe the behavior you expected

When reading from a dataframe, even if the dataframe is popped out in an external view window, I expected no change to the dataframe (and therefore, no updating of that window), particularly when there is nothing written to the dataframe.

  • I have read the guide for submitting good bug reports.
  • I have installed the latest version of RStudio, and confirmed that the issue still persists.
  • If I am reporting an RStudio crash, I have included a diagnostics report.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

Activity

  1. added
    new
    on Dec 13, 2024
  2. removed
    new
    on Dec 16, 2024
  3. added this to the Backlog milestone on Jan 23, 2025
  4. jthomasmock commented on Jan 23, 2025

    @jthomasmock
    Contributor

    Thanks @TobyHooker -- we'd like to look at fixing this. Until then, a workaround also might be creating a new Source Column, this would allow you to keep the source pane, console and data viewer in view all at the same time.

    Image

  5. TobyHooker commented on Jan 23, 2025

    @TobyHooker
    Author
  6. jthomasmock commented on Jan 23, 2025

    @jthomasmock
    Contributor

    Hey Toby you can add a new Source Column via the Command Palette (Ctrl + Shift + P) or via Global Options > Pane Layout:

    https://docs.posit.co/ide/user/ide/guide/ui/ui-panes.html

    Image

  7. TobyHooker commented on Jan 23, 2025

    @TobyHooker
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions