Interaction with R
On Sun, 8 Jul 2001 brunels at free.fr wrote:
Hello eve-R-ybody, i'd like to know where i can find some documentation about how calling foreign programs from a R function and use the results obtained. I mean, make an other program compute the value of a complex formula and use the result as an object in the R function.
It depends on what the other program is and exactly what you want to do. * Under Windows it may be possible to use the DCOM server (on CRAN in the Software|"Other" section) * If the program can read from standard input and write to standard output you can probably use connections (help(Connections), or see the "Data Import/Export Manual" * You can dynamically load compiled C, C++ or Fortran code into R and call these routines directly. * If you can get the program to write output to a file you can then read the file. -thomas Thomas Lumley Asst. Professor, Biostatistics tlumley at u.washington.edu 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._