r-lib / vctrs

Generic programming with typed R vectors
https://vctrs.r-lib.org
Other
289 stars 66 forks source link

Can't assign names to records #1952

Open joeroe opened 2 months ago

joeroe commented 2 months ago

Trying to assign non-NULL names to a vctrs_rcrd object is currently an error:

> rcrd <- new_rcrd(list(a = 1))
> names(rcrd) <- "a"
Error in `names<-`:
! Can't assign names to a <vctrs_rcrd>.
Run `rlang::last_trace()` to see where the error occurred.

I found some previous discussion of adding this functionality (#900, #1419, #1422), but no specific issue. Is it planned?