Repository navigation
jsonlite fails to convert all list subclasses #1820
Closed
JesusARAyo
started this conversation in
Ideas
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
First of all, thanks for this amazing tool! I migrated all of my R workflow to VS Code thanks to this extension some months ago, and am not missing RStudio at all given all the amazing quality of life improvements that VS Code offers. The latest release has worked great to me since having a user name with a tilde in letter u (C:\Users\Jesús) made it more difficult to have the extension functioning correctly, and it seems that the connection through sess can handle directory paths written with Unicode.
However, I would like to report that while working with the extension this past week I noticed that several "pseudo-list" classes, (objects types such as "lm" or "fixest", among others) were not being captured by the JSON viewer invoked by "View()". I checked it with Claude and it appears that the issue comes from the fact that jsonlite won't convert classes it does not recognize, producing as error "No method asJSON S3 class: lm".
In the mean time, since I usually work with regressions and list-kind of objects and have the need to explore them, I had Claude to prepare a list viewer (object_explorer) that resembles that of RStudio. This tool (explore_object) presents the data ordered in three columns (name, of the element, its type, and its values) and allow the user to expand the "tree" of sub-elements if possible. It also works with data frames. All the user has to do is to make some adjustments to the .Rprofile and leave the two R script in a stable directory (such as R's ).
I haven't really tested it thoroughly and am no expert, so I would not say it is a silver bullet. But I think it is a valid temporary solution while this issue with lists is solved. And since this is my first time ever publishing an issue in GitHub, I am open to any comments or suggestions.
Rprofile.txt
object_explorer.txt
vscode_view.txt
All reactions