Skip to content

Number >1 converted to boolean TRUE without any warning #756

@raffaem

Description

@raffaem

In the following example, readxl returns TRUE instead of 599, without any warnings nor errors.

This doesn't happen with xlsx, openxlsx or openxlsx2.

I understand this is related to readxl guessing the column type using the first 1000 rows, but it should return at least a warning if not an error if the data it encounters is incompatible with the column type it guessed.

test.xlsx

indf <- readxl::read_xlsx("test.xlsx")
indf %>% filter(project_id==1001) %>% pull("budget")
# returns TRUE
# should return 599

Metadata

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