FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fwrite(dec=',') with one column should work · Issue #7227 · Rdatatable/data.table · GitHub

fwrite(dec=',') with one column should work #7227

Description

fwrite(data.table(1), dec=',')
# Error in fwrite(data.table(1), dec = ",") : dec != sep is not TRUE

But this doesn't matter on a 1-column file where sep is not used.


As an aside (since we can already create these ambiguous files today):

It does create the potential for confusion where this file could either be 1- or 2-columns for fread:

fwrite(data.table(c(0.1, 0.2)), dec=',', sep='\t')
# V1
# 0,1
# 0,2

Basically you can't rely on the sep= auto-detection for such files any more -- even if there are 100s of x,y fields and only one header column, fread() doesn't guess that "maybe dec=',' and there's only one column".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL