vscode-R icon indicating copy to clipboard operation
vscode-R copied to clipboard

Viewing List Objects in VSCODE

Open zahrawii opened this issue 2 years ago • 6 comments

When you use Rstudio you can view lists in beautiful way, as you can see each level as a table.

7uvh7j

but in vscode, the lists are hard to navigate as they show in scattered way.

image

I hope you can add this feature to the extension!

zahrawii avatar Aug 05 '23 22:08 zahrawii

Hi,

Yes, I also have found this problem. Viewing lists is the only thing I prefer from RStudio, it's so much more comfortable. I work with phylogenies and my lists are quite big, VScode's viewer expands them automatically and they take forever... I would love it if lists opened in a collapsed form at least, and it would be great to see more information about them like @Zahrawi pointed out!

jimenamateo avatar Aug 28 '23 12:08 jimenamateo

@jimenamateo @Zahrawi Just as a comment - I am using the jsonedit function of the listviewer package. It's quite convenient and IMHO serves the purpose you've been looking for.

`library(tidyverse) library(listviewer)

df_l <- mtcars %>% nest(,.by=cyl)

listviewer::jsonedit(df_l$data) `

werkstattcodes avatar Aug 31 '23 08:08 werkstattcodes

Thank you @werkstattcodes, your jsonedit function shows the list directly collapsed, so I don't have to collapse it myself, but it is still a very uncomfortable way of seeing the information.

It would be great to have every element as a table, like the gif @datasciencemedicine shared!

jimenamateo avatar Oct 26 '23 10:10 jimenamateo

Totally agree! For me, this is the major downside of using R in VS Code instead of RStudio and the only reason I still switch back to RStudio from time to time. There are some projects that heavily depend on large lists which are a pain in the ass to work on in VS Code. Also experienced VS Code crashing when trying to view some of these lists.

m4x74 avatar Nov 07 '23 11:11 m4x74

Same here!

It is very difficult to work with large nested lists (compared to RStudio). If you could provide a mechanism to represent lists following RStudio's fashion it would be great 😀

romancardenas avatar Nov 16 '23 13:11 romancardenas

Hello. I also join this request. I am working with a list composed of data frames and can't view anything when I run View(). image However, in Rstudio it works fine.

castellco avatar Apr 18 '24 17:04 castellco