Thanks to visit codestin.com
Credit goes to github.com

Skip to content

dataxray doesn't play nice with haven imported data with labels #6

@ifellows

Description

@ifellows

Just discovered the package. I got the following error on the first dataset I tried it on. It looks like the HMisc::describe call in make_xray_core should coerce the input into either a factor or numeric.

> data.frame(a=1:3,b=haven::labelled(c(1, 1, 2), c(Male = 1, Female = 2))) %>% dataxray::make_xray()
Error in `mutate()`:
! Problem while computing `describe = ... %>% list()`.The error occurred in row 2.
Caused by error in `proxy[, ..., drop = FALSE]`:
! incorrect number of dimensions
Run `rlang::last_error()` to see where the error occurred.
Warning message:
Problem while computing `describe = ... %>% list()`.'length(x) = 2 > 1' in coercion to 'logical(1)'The warning occurred in row 2. 

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