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

Records with fields of type list and [[ #1205

Closed
krlmlr opened this issue Aug 3, 2020 · 1 comment
Closed

Records with fields of type list and [[ #1205

krlmlr opened this issue Aug 3, 2020 · 1 comment

Comments

@krlmlr
Copy link
Member

krlmlr commented Aug 3, 2020

I think both should be identical. Probably there's a similar problem with [[<- . Happy to send a PR.

library(vctrs)

xx <- new_rcrd(list(x = 1:3, a = list(1, 2:3, 4:6)))
field(xx[3], "a")
#> [[1]]
#> [1] 4 5 6
field(xx[[3]], "a")
#> [1] 4 5 6

Created on 2020-08-03 by the reprex package (v0.3.0)

@lionel-
Copy link
Member

lionel- commented Aug 26, 2020

Fixed by #1224 but I'll add your example as unit test just to be sure it's covered.

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

No branches or pull requests

2 participants