You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Could you please provide more details about your system (sessionInfo()). The example that you provided seems to work correctly on my machine:
> fread("name,id\nfoo,1\nbar%\n")
Error in fread("name,id\nfoo,1\nbar%\n") :
Line 2 has too few fields when detecting types. Use fill=TRUE to pad with NA. Expecting 2 fields but found 1: <<bar>>
sessionInfo()
# R version 3.4.1 (2017-06-30)# Platform: x86_64-w64-mingw32/x64 (64-bit)# Running under: Windows 7 x64 (build 7601) Service Pack 1## Matrix products: default## locale:# [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252# [4] LC_NUMERIC=C LC_TIME=French_France.1252 ## attached base packages:# [1] stats graphics grDevices utils datasets methods base ## other attached packages:# [1] data.table_1.10.5## loaded via a namespace (and not attached):# [1] compiler_3.4.1 tools_3.4.1
If it can help, this is the error I get with a slightly different command:
fread("name,id\nfoo,1\nb%ar\n")
# Error in fread("name,id\nfoo,1\nb%ar\n") : # Line 2 has too few fields when detecting types. Use fill=TRUE to pad with NA. Expecting 2 fields but found 1: <<b0x1.1812000360018p+711r>>
As you can see %a is replaced by 0x1.1812000360018p+711 in the message.
Note: On my Linux system everything works properly.
Thanks Etienne, this was helpful.
Seems like this problem appears on Windows / MacOS machines only. We'll try to resolve it asap because there appears to be a potential for a crash, not merely a poor error message.
Minimal example, tested on both CRAN and dev versions:
The text was updated successfully, but these errors were encountered: