diff --git a/Doc/Manual/R.html b/Doc/Manual/R.html index 367f7ab4d..7e878b782 100644 --- a/Doc/Manual/R.html +++ b/Doc/Manual/R.html @@ -27,9 +27,9 @@ R is a GPL'ed open source statistical and plotting environment. Information about R can be found at www.r-project.org. -The R binding are under active development and are extremely -experimental. Not all features have been implemented and the API is -not stable. +The R bindings are under active development. They have been used to +compile and run an R interface to QuantLib running on Mandriva Linux +with gcc, and testing on other platforms is appreciated.

32.1 Bugs

@@ -50,13 +50,13 @@ Currently the following features are not implemented or broken:

To use R and SWIG in C mode, execute the following commands where -example_func.c is the name of the file with the functions in them +example.c is the name of the file with the functions in them

-swig -r -o example,c example.i
-PKG_LIBS="example_func.c" R CMD SHLIB example.c
+swig -r example.i
+PKG_LIBS="example.c" R CMD SHLIB example_wrap.c
 
@@ -66,8 +66,8 @@ The corresponding comments for C++ mode are
-swig -c++ -r -o example.cpp example.i
-PKG_LIBS="example_func.cxx" R CMD SHLIB example.cpp
+swig -c++ -r example.i
+PKG_LIBS="example.cxx" R CMD SHLIB example_wrap.cpp
 
@@ -79,22 +79,43 @@ rather than cxx for the R compile command to recognize it.

-The commands produce two files. A dynamic shared object file called -example.so and an R wrapper file called example_wrap.S. To load these +The commands produces two files. A dynamic shared object file called +example_wrap.so and an R wrapper file called example_wrap.R. To load these files, start up R and type in the following commands

-dyn.load('example.so')
-source('example_wrap.S')
+dyn.load('example_wrap.so')
+source('example_wrap.R')
+cacheMetaData(1)
 
+The cacheMetaData(1) will cause R to refresh its object tables. +Without it, inheritance of wrapped objects may fail. +

These two files can be loaded in any order

+

Precompiling large R files

+ +In cases where the R file is large, one make save a lot of loading +time by precompiling the R wrapper. This can be done by creating the +file makeRData.R which contains the following + +
+source('BigFile_wrap.R')
+save(list=ls(all=TRUE),file="BigFile_wrap.RData", compress=TRUE)
+q(save="no")
+
+ +This will generate a compiled R file called BigFile_wrap.RData that +will save a large amount of loading time. + + +

32.3 General policy