Edit: REAL solution from Thomas Petzoldt in the R help list:
"[Error] occurs if the package with the deSolve package is loaded after the compiled model ... The solution is to load deSolve before [before loading the DLL], ideally at the very beginning of your script, and at least before that loading / unloading the DLL /. so "
If this does not work, the following may be (old answer):
I found a somewhat inelegant solution.
The problem is that the "unlock_solver" function in deSolve somehow does not execute correctly. You can download and reload the entire deSolve.so file, rather than restart R.
For this you can use something like:
require(deSolve) # encounter error library.dynam.unload("deSolve", libpath=paste(.libPaths()[1], "//deSolve", sep="")) library.dynam("deSolve", package="deSolve", lib.loc=.libPaths()[1])
You will need to replace ".libPaths () [1]" wherever you set deSolve if it is not in the first element of your .libPaths variable.
This is something like a sledgehammer. I sent a request to the r-help list, asking if there is a way to change where R is looking for "unlock_solver", or just unload / reload the deSolve part.
source share