RStudio Sort in Data.frame View not working

I am using RStudio Version 1.2.1335. Occationally, I view my data.frame in the source pane and to filter and sort the data. However, the sorting functionality does not seem to work. The order the rows change, but are not in the right order afterwards.

Best wishes, Silke

Hi,

In order for us to help you with your question, please provide us a minimal reprocudible example where you provide a minimal (dummy) dataset and code that can recreate the issue. One we have that, we can go from there. For help on creating a Reprex, see this guide:

Good luck!
PJ

Here is my example.

In my RStudio, I only see 50 columns at once. The problem does not occur if I want to sort one of the first 50 columns. But after switching to the end of the data view (using >>) ordering and filtering does not work anymore. It seems to be a bug in the RStudio IDE.

mtcars2 <- cbind(mtcars,mtcars,mtcars,mtcars,mtcars)

With mtcars2 I can reproduce the problem.

Silke

grafik

It just so happens that I had exactly the same dataframe in my environment while answering another question, but I can't reproduce your problem. One difference I have is that I've renamed the columns to have unique names with tibble(.name_repair = "unique"). Can you try doing the same and see if it helps?

I see exactly the same issue with any dataset with more than 50 columns. When I click the double right arrow in RStudio View to see columns 51-onward, none of the newly-revealed columns respond properly to the sort up/sort down arrows. The rows move around, but they don't end up in proper sort order.
RStudio Version 1.2.1335: using tibble(df,.name_repair="unique") has no effect.

Looking in it a little more, I can see that its indeed broken.

You are more likely to get attention from the RStudio developers by filing an issue on the github repository

Just make sure to follow this guide about how to write good bug reports:

2 Likes

I believe this is same as this issue, which is already marked as a confirmed bug:

3 Likes

You are correct. My issue is the same as the already reported bug. Thanks.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.