Skip to content

Allow categorical variables to be (ordered) factors #103

@deepayan

Description

@deepayan

In the Translated tables obtained from a database version, categorical variables have their responses stored as character strings. This is often fine, but sometimes there is an ordering of the levels that we may want to retain in modeling / visualization.

We can do this by returning categorical variables as factors. The natural choice of order of the levels is the ordering in the codebook. nhanes() should have an option to use this. However, care is needed in case some special levels are converted (to NA etc.).

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