R-beta: How do I dyn.load in R for Windows95?

Thor Thoresen thor.thoresen at hlk.hj.se
Thu May 14 12:50:59 CEST 1998


I am currently running R under Windows95.

I am entirely new to R in any environment, with no prior experience of S
or S-Plus
either.
I want to run some functions written for S-plus and residing in a file
"cat.s". The
fuctions also call some Fortran routines residing in a compiled fortran
file "cat.obj"

In S-Plus as I understand it I am supposed to first

dyn.load("cat.obj")

then

source("cat.s")

in order to run the added functions.

When I am trying this in R it seems that the R dyn.load expects a
directory name
(according to the html help-page) whereas S-Plus expects a file name.
A dyn.load("cat.obj") referencing the file name produces this error
message:

Error in dyn.load(x) : unable to load shared library
"C:\Program\r.gnw\library\cat\cat.obj"

However if I instead make a reference to the directory were my
Fortran file resides R still comes up with an error message:

dyn.load("cat")

Error in dyn.load(x) : unable to load shared library
"C:\Program\r.gnw\library\cat"

I have tried to "invoke" R  from different directories (by providing
different initial directories in the Windows95 program information file)
so it will have no reason to miss the Fortran object file. I have also
tried different suffixes to the Fortran
file such as .o and .for. I suppose I also have to rename the "cat.s"
file to "cat.R"

I have searched the Notes on R, the FAQ and naturally the html help
files but cannot find any clues.

(by the way, I have not managed to dyn.load the file (zero.c) residing
in the directory "\demos\dynload\" either)

Could anyone please come up with a solution.

Thanks very much

Thor

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list