'Embedded nul in string' error when importing csv with fread
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a large file (3.5G) that I'm trying to import using data.table::fread . It was originally created from an rpt file that was opened as text and saved as a CSV. This has worked fine with smaller files (of the same type of data-same columns and all. This one is just for a longer timeframe and wider reach). When I try and run mydata <- fread("mycsv.csv") I get the error: Error in fread("mycsv.csv") : embedded nul in string: 'y\0e\0a\0r\0' What does this mean? 回答1: We can remove the null terminators on the command line using something like