posit-dev / posit-dev/positron
vctrs records in R environment pane
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 4.3k
- Forks
- 184
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 195
Description
Follow up to this comment: https://github.com/rstudio/positron/pull/559#discussion_r1195182114
> rcd <- new_rcrd(list(x = 1:10, y = letters[1:10]), class = "mylist")
> length(rcd)
[1] 10
This creates a record of size 10 with 2 fields. But the environment pane only shows the record as a boring list:
even if it has a format() method:
> format.mylist <- function(x, ...) paste("(", field(x, "x"), ", ", field(x, "y"), ")", sep = "")
> rcd <- new_rcrd(list(x = 1:10, y = letters[1:10]), class = "mylist")
> rcd
<mylist[10]>
[1] (1, a) (2, b) (3, c) (4, d) (5, e) (6, f) (7, g) (8, h) (9, i)
[10] (10, j)
Should it look more like format(rcd):
fmt <- format(rcd)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the environment pane's handling of R objects and the discussion linked from posit-dev/positron#559. Reproduce the vctrs::new_rcrd example from the issue and compare the pane's display with format(rcd). Done means the record is presented using its formatted representation instead of as a generic list.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100