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

Thor Thoresen (thor.thoresen@hlk.hj.se)
Thu, 14 May 1998 12:50:59 +0200

Date: Thu, 14 May 1998 12:50:59 +0200
From: thor.thoresen@hlk.hj.se (Thor Thoresen)
To: r-help@stat.math.ethz.ch
Subject: R-beta: How do I dyn.load in R for Windows95?

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
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




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

Error in dyn.load(x) : unable to load shared library

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


Error in dyn.load(x) : unable to load shared library

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


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@stat.math.ethz.ch