Skip to content

Support multi-character sep argument #2011

Description

@richierocks

I want to write:

fread(
  "x<SEP>y\n1<SEP>a\n2<SEP>b",
  sep = "<SEP>"
)

This gives the error message

Error in fread("x<SEP>y\n1<SEP>a\n2<SEP>b", sep = "<SEP>") : 
  'sep' must be 'auto' or a single character

Real-world example of a dataset that uses <SEP> as a column separator:

http://labrosa.ee.columbia.edu/millionsong

Activity

  1. MichaelChirico commented on Jul 23, 2025

    @MichaelChirico
    Member

    8 years later and only one other community request for this... I suspect it will be nontrivial to support this & with potential performance impacts for the 1-character case.

    PRs welcome, but for now, pumping such files through sed or some other command-line tool first to convert the multi-character sep= into a one-character alternative seems good enough.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions