Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R environment pane: named list expansion #354

Merged
merged 21 commits into from
Apr 4, 2023
Merged

Conversation

romainfrancois
Copy link
Contributor

@romainfrancois romainfrancois commented Mar 31, 2023

This is very minimal and limited so far, i.e. only lists can be expanded (this includes data.frames), but at least this wires things for Inspect and Details messages.

x <- list(abc = 1:100, list(ghi = letters, iris))

image

}

.ps.environment_extract <- function(env, path) {
object <- env
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: the usages above seem to imply this function returns an R list, but it seems like it's returning an environment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It actually returns whatever the path means, i.e. if we have c("foo", "bar", "[[1]]") then it will return <env>$foo$bar[[1]] but this function is a temporary thing anyway, this will need eventually to be more careful if e.g. <env>$foo is an environment and bar is an active binding or a promise in this environment etc ...

I think the function will eventually be replaced by some rust logic.

@romainfrancois
Copy link
Contributor Author

Now handling things like Date, POSIXct, and POSIXlt via format() :

image

@romainfrancois
Copy link
Contributor Author

Merging this now, but carrying on ...

@romainfrancois romainfrancois merged commit cdeff8a into main Apr 4, 2023
@wesm wesm deleted the feature/renvpane_list branch March 15, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants