[R] library

Heberto Ghezzo heberto at MEAKINS.Lan.McGill.CA
Wed Apr 7 11:29:57 CEST 1999

I also have several packages in my RW0633 in Windoze
and I would like to keep them in one place when I update the R 
Brian say to modify Rprofile to
..lib.loc <- c("c:/MyR/library",.Library)
now Rprofile has a line like
.lib.loc <- unique(c(unlist(strsplit(getenv("RLIBS"),":")),.Library)
Sorry to be dense but where should I put the "C:/MyR/library" string?
inside the c("..",unlist...)
                     ^   ?
Now I have another question, I would like to implement the 
'CutCorner" mothod of random variable generation, I have the C code 
which calls a function which returns the ordinates of the 
distribution to be sampled. Since I do not want to generate normals 
or betas but distributions estimated from lowess or splines the said 
function have to be written in R. Say it is MyDist()
So I need a 'Setup" function that calls the C and set up parameters 
and passes the name of the R function to compute the distribution and 
a "Rand" function that just calls a C function that returns the 
random variate.
Now in R I put .C("Setup_system",as.double(par1),MyDist,....
How do I pass the name of the R function that evaluates the 
distribution? i.e. MyDist()
and in Setup_system.c() how do I call the R function?
Thanks for any help in any or both questions.
R. Heberto Ghezzo  Ph.D.
Meakins-Christie Labs
McGill University
Montreal - Canada
heberto at meakins.lan.mcgill.ca
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