Skip to content

WISH: @ to work on any object with attributes #174

Description

@J-Moravec

@ is a S4 method to extract slot. S4 slots are, to my knowledge, implemented as attributes.

But any object in R can have attributes, yet accessing attributes is quite bit more awkward (attributes() or attr()) compared to classical subsetting with [, [[, or $.

With @ working by default on any class and being tab-complete-friendly in REPL, it would go quite big way to enhance the data space of R.

For instance, dplyr's group_by is not changing the object itself, but the grouped information is in attributes, which can then be used by summarize.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions