Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
raffaem opened this issue Aug 23, 2024 · 0 comments
Open

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

raffaem opened this issue Aug 23, 2024 · 0 comments

Comments

@raffaem
Copy link

raffaem commented Aug 23, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant