fwrite auto quotation

Open
#2,902 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start with NEWS.md v1.11.0 and the fwrite documentation to understand the current quote and na behavior. Review the existing fwrite tests referenced in the issue and determine how an optional setting should preserve the pre-v1.11.0 treatment of empty strings and NAs; done means the behavior is specified and covered for both defaults and the new option.

Written by the indexing model from the issue text.

Description

fwrite

Concerning NEWS.md v1.11.0:

fwrite():

empty strings are now always quoted (,"",) to distinguish them from NA which by default is still empty (,,) but can be changed using na= as before. If na= is provided and quote= is the default 'auto' then quote= is set to TRUE so that if the na= value occurs in the data, it can be distinguished from NA. Thanks to Ethan Welty for the request #2214 and Pasha for the code change and tests, #2215.

Could we make this feature optional, perhaps by adding an option to the quote parameter? I preferred how fwrite before this update, where empty strings and NAs were the same in the delimited file.

Dominant language
R
Stars
3.9k
Forks
1.1k
Avg merge
14h 4m
Merged PRs (30d)
4

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Rdatatable/data.table

All issues in Rdatatable/data.table

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.