Replacing dll file in R package

I am working with the glmnet package package and want to change something in this package. This package has the fortran code compiled into a .dll file. I want to change something in this fortran code, compile it and replace the old dll file with the new one.

For starters, I just took the source code for fortran 77, converted it to fortran 95, compiled it into a dll file and replaced it. I expected it to work the same as before, but it doesn't. I used the same glmnet command but got the following error:

Error in .Fortran ("get_int_parms", fdev = double (1), eps = double (1),: "get_int_parms" is not available for .Fortran () for package "glmnet"

With R, I am using the following code:

data("Hitters")
dim(Hitters)
Hitters=na.omit(Hitters)

set.seed(1)
train=sample(c(TRUE,FALSE),nrow(Hitters),rep=TRUE)
test=(!train)

x=model.matrix(Salary~.,Hitters)[,-1]
y=Hitters$Salary
grid=10^seq(10,-2,length=100)

lasso.mod=glmnet(x[train,],y[train],alpha=1,lambda=grid)
plot(lasso.mod)

      

Apologies for my english. I hope you understand what my problem is.

+3


source to share





All Articles