;barpkg",pkgname,
libname)}
barfun<-function(n,x){
.Fortran("bar",as.integer(n),as.double(x))
}
package.skeleton(name="barpkg",list=c("barfun"))
I am not sure about this part. Can anyone give me some suggestion?
I appreciate that very much.
-Emily
On Mon,
Hello, all
I am building a R package using Fortran source code. The Fortran code is a
subroutine. I can use "R CMD SHLIB bar.f -o bar.o" to create the shared
library. For the R package, I put the fortran file in the src/ and I use R
code as follows:
".First.lib"<-function(libname,pkgname){librar