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

suggest to change default quote parameter for tsv #844

Closed
jhpoelen opened this issue May 9, 2018 · 5 comments
Closed

suggest to change default quote parameter for tsv #844

jhpoelen opened this issue May 9, 2018 · 5 comments
Labels
feature a feature request or enhancement
Milestone

Comments

@jhpoelen
Copy link

jhpoelen commented May 9, 2018

In IANA's definition of TSV at https://www.iana.org/assignments/media-types/text/tab-separated-values , no mention is made of string quoting. In fact, the reason for the use of TSV was to avoid having to deal with confusing string quoting at all by simply stating the tab character may not be used in the values of fields.

Currently, the default value of "quote" parameter in readr::read_tsv is \".

To follow the spirit of TSV, suggest to change the default value of the "quote" parameter in readr:read_tsv (and accompanying methods) to an empty value.

@jimhester jimhester added the feature a feature request or enhancement label May 9, 2018
@jimhester
Copy link
Collaborator

This seems reasonable to me, do you have an opinion @hadley?

@hadley
Copy link
Member

hadley commented May 9, 2018

Hmmm, I'd be slightly concerned about breaking existing code, but it seems like it should be ok.

@cboettig
Copy link
Contributor

@jimhester I think this issue also impacts write_tsv()? Looks like readr cannot write a IANA valid tsv file with quoted text, since there's not even an option(?) to not double-quote quotations?

@jhpoelen
Copy link
Author

@jimhester @hadley would you consider a pull request on this topic?

@jimhester
Copy link
Collaborator

@cboettig there is now a escape_na option for the write_*() functions, so at least that concern is removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature a feature request or enhancement
Projects
None yet
Development

No branches or pull requests

4 participants