R vector size limit: “long vectors (argument 5) are not supported in .C”

后端 未结 2 1957
迷失自我
迷失自我 2021-02-02 17:21

I have a very large matrix I\'m trying to run through glmnet on a server with plenty of memory. It works fine even on very large data sets up to a certain point, after which I g

2条回答
  •  青春惊慌失措
    2021-02-02 18:20

    There is a note in ?"long vector" which states:

    However, compiled code typically needs quite extensive changes. Note that the .C and .Fortran interfaces do not accept long vectors, so .Call (or similar) has to be used.

    elnet makes .Fortran calls. You would have to modify the function to use .Call, perhaps via a C wrapper that calls the FORTRAN code, and possibly rewrite and compile the relevant FORTRAN code to deal with long vectors.

提交回复
热议问题