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

FR: Spin off readr::type_convert() and other type inferencing tools #1517

Closed
chainsawriot opened this issue Sep 14, 2023 · 3 comments
Closed

Comments

@chainsawriot
Copy link

I found that several R and BioC packages using readr are simply using readr::type_convert(), readr::parse_date() and column specification tools only for converting ambiguous dataframes with appropriate column types (e.g. readODS, timetk, sergeant, unglue, surveytoolbox). While this package's main functionalities are reading rectangular text files, it is quite unnatural for many packages depending on readr but not for reading text files.

I was wondering would you consider spinning off these type inferencing tools from readr? Thank you very much!

@jennybc
Copy link
Member

jennybc commented Sep 15, 2023

I see where you're coming from, but readr (especially these legacy first edition bits of readr) is in a very quiescent phase at the moment. So, while I can imagine contemplating such a thing, in practice this is something I don't see getting any traction in the near to medium term. As the readr/vroom maintainer, there are other historical oddities that are more problematic and that I would prioritize over this.

@chainsawriot
Copy link
Author

@jennybc I was wondering: if I do that myself, would the tidyverse team oppose it?

@jennybc
Copy link
Member

jennybc commented Apr 19, 2024

As @hadley said in an email (and I agree), no objections if you want to make a separate package.

I'll just make one observation from maintaining readr and vroom, which is that it has been painful to have functions like those you mention (readr::type_convert(), readr::parse_date()) which are exported but, as of readr's second edition, are also not actually used by readr when parsing a file. Morally, obviously all of those things are trying to do the same thing, but the devil is in the details. Of course when those functions first appeared in readr, it was all hitting a common code path. The current situation is the result of switching readr's default backend to vroom.

Anyhow, I just wanted to record this gotcha somewhere, because I can totally imagine one of us needing to link to it in some future discussion of why a certain column converts one way when converted by itself, based on strings, and another way when converted as part of an entire file.

@jennybc jennybc closed this as completed Apr 19, 2024
chainsawriot added a commit to gesistsa/minty that referenced this issue May 3, 2024
With the permission from the tidyverse team

See tidyverse/readr#1517
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

2 participants