Skip to content

Further R-devel changes making things a little easier on attribute access #1432

@eddelbuettel

Description

@eddelbuettel

This morning via the RSS feed of NEWS changes:

  • New function ‘R_getAttributes’ returns the same result as the R function ‘attributes’. New functions ‘R_getAttribCount’, ‘R_getAttribNames’, ‘R_hasAttrib’, ‘R_nrow’, and ‘R_ncol’.

What we added of course still works, but these additions should make things generally simpler. There is a bit more in the entry mostly on ALTREP.

PS Interestingly R_nrow and R_ncol return int so if we used them we'd break interface again as we standardised on R_xlen_t. Or we would have to (needlessly ?) cast up.

PPS I also emailed with Luke who responded that he was also going back and forth on that but that given how dim attributes are still 32 bit a lot more would have to change. Possibly at a later point...

PPPS Hah! And just I typed the previous comment I also refresh SVN and voilà we have

r89262 | luke | 2025-12-31 10:47:28 -0600 (Wed, 31 Dec 2025) | 2 lines

Change return types for R_nrow and R_ncl to R_xlen_t.

Thanks @ltierney !

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions