Skip to content
This repository was archived by the owner on Mar 20, 2024. It is now read-only.
This repository was archived by the owner on Mar 20, 2024. It is now read-only.

Get a single vector with [[ #98

@reinholdsson

Description

@reinholdsson

Often one is only interested in one vector and then it's not too obvious to type a['var'][[1]] (since [ always returns a table - even if it only returns a single variable). However, a complementary solution could be to make use of [[, e.g. a[['var']].

It should through an error or only select the first variable if multiple variables are asked for. Also, it should only allow for one dimension. Perhaps the easiest way would be to only return the first match y[[1]] in y <- list_to_query_repr(x$variable_match(name = i, dims = j)).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions