Skip to content

throw error when the separator is '' #40

Open

Description

@lilchow

The concatenated column, 'response', in my data.table,'dt.gdoc' contains number string with no separator, e.g. "13464". I wanted to split this column into a list using

cSplit_l(dt.gdoc,'response',sep='',drop=T)

However, when I attempted to run this code, I got the following error:

Error in gsub(sprintf("\s+[%s]\s+|\s+[%s]|[%s]\s+", delim, delim,  : 
  invalid regular expression '\s+[]\s+|\s+[]|[]\s+', reason 'Missing ']''

Activity

  1. mrdwab commented on Jan 26, 2015

    @mrdwab
    Owner

    @lilchow, Thanks. I'll look into it. I'll probably need to add a stripWhite = FALSE argument like there is for cSplit.

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