Deprecate sep="\n"?

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

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
r
Domain
data

Research direction

Start with the referenced NEWS.1.md entry and R/fread.R lines 12–15, then run the shown fread example to confirm current behavior. Determine the intended treatment of sep="\n" and whether the NEWS statement still applies; done means a decided deprecation direction with the relevant documentation or behavior changes identified.

Written by the indexing model from the issue text.

Description

breaking-change fread

https://github.com/Rdatatable/data.table/blob/6c1fd839e0e0257d13f07975ead0fe6fdfee2f61/NEWS.1.md?plain=1#L1209

This NEWS item (1.11.0, 2018) mentions sep="\n" would be deprecated, but I don't know why. It seems to work fine:

fread("a\nb\nc", sep = "\n")
#    a
# 1: b
# 2: c

And here sep is set to \n before sending on to C:

https://github.com/Rdatatable/data.table/blob/6c1fd839e0e0257d13f07975ead0fe6fdfee2f61/R/fread.R#L12-L15

I guess it's about clarity for Windows, where sep="\n" doesn't mean literally \n, but "end-of-line", i.e., "\n" is actually a "sentinel".

But it doesn't seem to have caused any issue in the interim. Do we want to follow through with deprecating sep = "\n"?

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.