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.

Add attribute to drop levels in get method #91

@reinholdsson

Description

@reinholdsson

See the below example:

sum(a["SEKTORTILLHORIGH", 2010] == "Landsting" & rowSums(a["I38", c(2013, ._), na = 0]) > 1200)

sum(as.integer(a["SEKTORTILLHORIGH", 2010][[1]]) == 5 & rowSums(a["I38", c(2013, ._), na = 0]) > 1200)

The second query - where one use the ID instead of LEVEL - it's not that easy to use, an alternative could be:

sum(a["SEKTORTILLHORIGH", 2010, levels = F] == 5 & rowSums(a["I38", c(2013, ._), na = 0]) > 1200)

If this is to be implemented, we could add if (levels) ... in code. I guess header$type == "factor" variables shouldn't be converted from integer to factor as well.

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