Skip to content

Labelled column headers are right aligned in tibble output #676

Closed

Description

Column headers for labelled columns are right aligned in console tibble output which can make it difficult to interpret which values are associated with which column. See below:

image

col3 is almost above the values of col4, making it difficult to read.

Hopefully useful reprex

library(purrr)
library(tibble)
library(haven)

# Combine labelled columns into tibble
map_dfc(paste0("col", 1:4), 
        # Create labelled column
        ~tibble(!!.x := labelled(sample(c(1,5,8,9), 20, replace = T),
                                 labels = c(Yes = 1, No = 5,
                                            `Don't know` = 8,
                                            Refused = 9))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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