You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Environment pane won't expand contents for data frames with ALTREP columns #4758
It was really hard to come up with a name of this bug. The issue is as follows: If I have a dataframe with more than one row, it is not possible to "click open" the dataframe and see the names of the variables and data types. The button simply doesn't exist.
@KoningD Thank you for reporting this! I can reproduce this on MacOS 10.14 on RStudio Desktop 1.2.1335.
No problem regarding the format. We do prefer using the template that shows up when you file a new issue, as it helps us review the bug more quickly, and it hopefully helps you with providing the needed information—and you've provided this, including a specific, helpful example of how to reproduce the issue. Besides the behavior of the bug, it's very useful to provide information about the product on which you've found the issue. I was able to reproduce it, so it's not critical, but could you add the following information? In the meantime, I'll update the subject line. Thanks!
RStudio Edition : <!-- Desktop or Server -->
RStudio Version :
OS Version :
R Version :
changed the title [-][bug]: RStudio IDE - environment pane not able to preview dataframe [/-][+]Environment pane won't expand contents for data frames with multiple observations[/+]on May 6, 2019
In newer versions of R, when you use a sequence like 1:4, R doesn't store the whole sequence -- it instead stores an alternative representation of the sequence that is only unrolled when needed. Obviously for things like 1:4 it doesn't make a big difference, but ALTREPs can be very expensive to evaluate. For example, evaluating one can actually cause entire files to be read from disk (see https://github.com/r-lib/vroom).
For this reason, newer versions of RStudio are careful to avoid anything that would unroll the ALTREP, and that includes generating a preview in the environment pane. See #4171 for some other discussion of the issue.
So--technically--RStudio 1.2 is doing the right thing here by keeping those sequences from getting unrolled, whereas 1.1 is brazenly evaluating them, consequences be damned.
I think the fix here should be to treat ALTREP data frames like we do very large data frames; the data frame preview can be deferred and loaded on demand.
changed the title [-]Environment pane won't expand contents for data frames with multiple observations[/-][+]Environment pane won't expand contents for data frames with ALTREP columns[/+]on May 6, 2019
Activity
ronblum commentedon May 6, 2019
@KoningD Thank you for reporting this! I can reproduce this on MacOS 10.14 on RStudio Desktop 1.2.1335.
No problem regarding the format. We do prefer using the template that shows up when you file a new issue, as it helps us review the bug more quickly, and it hopefully helps you with providing the needed information—and you've provided this, including a specific, helpful example of how to reproduce the issue. Besides the behavior of the bug, it's very useful to provide information about the product on which you've found the issue. I was able to reproduce it, so it's not critical, but could you add the following information? In the meantime, I'll update the subject line. Thanks!
ronblum commentedon May 6, 2019
This is a regression: it works in 1.1.463.
[-][bug]: RStudio IDE - environment pane not able to preview dataframe [/-][+]Environment pane won't expand contents for data frames with multiple observations[/+]jmcphers commentedon May 6, 2019
The problem here is subtle and is due to not to multiple observations but to ALTREPs.
In newer versions of R, when you use a sequence like
1:4, R doesn't store the whole sequence -- it instead stores an alternative representation of the sequence that is only unrolled when needed. Obviously for things like1:4it doesn't make a big difference, but ALTREPs can be very expensive to evaluate. For example, evaluating one can actually cause entire files to be read from disk (see https://github.com/r-lib/vroom).For this reason, newer versions of RStudio are careful to avoid anything that would unroll the ALTREP, and that includes generating a preview in the environment pane. See #4171 for some other discussion of the issue.
So--technically--RStudio 1.2 is doing the right thing here by keeping those sequences from getting unrolled, whereas 1.1 is brazenly evaluating them, consequences be damned.
I think the fix here should be to treat ALTREP data frames like we do very large data frames; the data frame preview can be deferred and loaded on demand.
[-]Environment pane won't expand contents for data frames with multiple observations[/-][+]Environment pane won't expand contents for data frames with ALTREP columns[/+]Mosk915 commentedon Jul 15, 2020
We just upgraded to RStudio Server Pro Version 1.3.959-1 and are now noticing this issue. Was something changed that would cause this issue to return?