Skip to content

library

5 messages · Guido Masarotto, Brian Ripley, Nicholas Lee +1 more

#
On Wed, 7 Apr 1999, Heberto Ghezzo wrote:

            
The ":" is a mistake: it should be ";" on Windows (and is on rw0640).
I suggesting putting the line in your .Rprofile, not in Rprofile: the `.'
is crucial. That is have .Rprofile containing

.lib.loc <- c("c:/MyR/library", .Library)

Put the .Rprofile file where R will find it: it tries

HOME
R_HOME
the working directory of the shortcut launching Rgui

in turn.

An easier way if this is your personal machine is to replace the
line in etc/Rprofile by the one I have given above.
Sounds to me as if you need to use call_R and pass the function (not its
name) as an argument to .C("Setup_system", ....

Now, there are not many examples of call_R/call_S about.  Read the
appropriate section in the Blue Book rather carefully.
#
On Wed, Apr 07, 1999 at 05:16:31PM +0100, Prof Brian D Ripley wrote:
Not many, but one small which shows exactly this sort of things
  is the R dynload demo. Look to demos/dynload/zero.[cR]

  g.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Wed, 7 Apr 1999, Guido Masarotto wrote:

            
That _is_ the example from the Blue book: you will need to read the book
(very, very carefully in my experience) to understand the incantations in
the C source.
#
On Wed, 7 Apr 1999, Prof Brian D Ripley wrote:

            
You might want to try:
http://www.mathsoft.co.uk/splus/download/cfortran.pdf

There is an example in there which is reasonibly clear. 


The c/fortran bit of glm code in Splus, uses some special magic stuff with
frames and memcpys.  I've got some example code of that here is that might
be a better type of solution.  Although I have try this stuff in R, and it
might not work.

Nicholas



-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Thu, 8 Apr 1999, Nicholas Lee wrote:
As the internals of R and S are different the frame/memcpy stuff can be
guaranteed not to work. It shouldn't even compile. 

Equivalent kinds of things are possible in theory, but require an
understanding of the undocumented internals of R, and in particular the
black art of pointer protection, to stop the garbage collector tromping
all over your data. In contrast to call_S you would be working with `live'
objects on the R heap rather than fixed-address copies. There are
currently at least two attempts in progress to do this (for nlme and
survival5).


Thomas Lumley
Assistant Professor, Biostatistics
University of Washington, Seattle

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