data.table fread()有时会在读取制表符分隔或csv文件时崩溃我的R会话。这取决于输入文件确定性地发生。
> fread('C:/TEMP/single_cell_ia.txt', verbose = TRUE)
Input contains no \n. Taking this to be a filename to open
File opened, filesize is 0.000099 GB.
Memory mapping ... ok
Detected eol as \n only (no \r afterwards), the UNIX and Mac standard.
Positioned on line 1 after skip or autostart
This line is the autostart and not blank so searching up for the last non-blank ... line 1
Detecting sep ...
[R会话崩溃]
可以使用read.delim()或read.csv()读取带有fread()问题的文件而不会出现问题。我已经使用制表符分隔文件执行了许多测试,并观察了以下内容:
问题解决了:
问题没解决:
我无法创建一个小问题,在这里发布问题,但我很高兴发送我用于测试的文件(104 kB; 14行; 803列)
谢谢, 斯特芬。
> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252 LC_MONETARY=English_Australia.1252
[4] LC_NUMERIC=C LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] data.table_1.10.4
loaded via a namespace (and not attached):
[1] tools_3.3.3