Skip to content

Sister function to readSO to allow reading of fixed width data posted at SO #17

@mrdwab

Description

@mrdwab

Sometimes data is pasted to Stack Overflow in a fixed width format like the following:

NYC1       1/1/2013      2/1/2013      Open
NYC1       2/2/2013      2/3/2013      Closed for Inspection
Boston1    1/1/2013      2/5/2013      Open

readSO cannot correctly read such data because of the spaces in the fourth column.

readSOfwf() Gist of rough concept here attempts to address this problem in a somewhat crude way:

  • Assume that anything more than one space represents a new column
  • Replace multiple spaces with a comma
  • Assume that items separated by a single space belong together

This won't work, though, with cases like the data shared in this question. In that example, it will simply return a single column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions