Simple execution
kmeans(runif(46e6), 2)
leads to an error:
Error in do_one(nmeth) : NAs in foreign function call (arg 13)
In addition: Warning message:
In do_one(nmeth) : NAs introduced by coercion
any thoughts? I have provided session information below. I found only one thread that mentions this, without an answer: R kmeans NAs in an external function call error (arg 13) . Obviously, the input is numerical ...
sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] zoo_1.7-11 rgdal_0.9-1 raster_2.3-12 sp_1.0-16
loaded via a namespace (and not attached):
[1] grid_3.1.0 lattice_0.20-29 tools_3.1.0
EDIT: I thought it was a memory issue. The machine used during my first attempt had 8 GB. I updated R to the most recent version of date 3.1.2, and it had the same problem.
I tried this on two other machines:
- The second attempt was on a Windows machine with R 3.1.0 and 160GB RAM - same error
- The third attempt was on another Windows machine with R 2.15 and 63GM RAM - it was successful.
- R.3.1 ? , .