fread and column with a trailing backslash

前端 未结 1 1347
傲寒
傲寒 2021-01-14 10:50

I have a problem with fread() reading a column of directory paths using \"\\\" as the directory separator. The issue is that the trailing directory separator throws an erro

1条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-14 11:42

    Now fixed in v1.9.3 on GitHub.

    • fread() now accepts trailing backslash in quoted fields. Thanks to user2970844 for highlighting.
    $ cat example.csv
    file,size
    "windows\user\",123
    
    > require(data.table)
    > fread("example.csv")
                  file size
    1: windows\\user\\  123
    > read.csv("example.csv")
                 file size
    1 windows\\user\\  123
    > 
    

    0 讨论(0)
提交回复
热议问题