Revision: 493
http://rpy.svn.sourceforge.net/rpy/?rev=493&view=rev
Author: lgautier
Date: 2008-04-17 12:16:29 -0700 (Thu, 17 Apr 2008)
Log Message:
-----------
- Editing in the python doc, or the source comments
- snatched the clean up part from RPy1 (still have to sort the details)
Modified Paths:
--------------
branches/rpy_nextgen/rpy/rinterface/rinterface.c
Modified: branches/rpy_nextgen/rpy/rinterface/rinterface.c
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-04-17 19:12:30 UTC
(rev 492)
+++ branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-04-17 19:16:29 UTC
(rev 493)
@@ -102,19 +102,7 @@
Check the documentation for the module this is bundled into if\
you only wish to have an off-the-shelf interface with R.\
\n\
- Example of usage:n\
-import rinterface\n\
-rinterface.initEmbeddedR(\"foo\", \"--verbose\")\n\
-n = rinterface.SexpVector((100, ), rinterface.REALSXP)\n\
-hist = rinterface.globalEnv.get(\"hist\")\n\
-rnorm = rinterface.globalEnv.get(\"rnorm\")\n\
-x = rnorm(n)\n\
-hist(x)\n\
-\
-len(x)\n\
-\n\
");
-//FIXME: check example above
/* Representation of R objects (instances) as instances in Python.
@@ -141,7 +129,7 @@
{
if (PyObject_IsTrue(embeddedR_isInitialized)) {
- PyErr_Format(PyExc_RuntimeError, "Already initialized.");
+ PyErr_Format(PyExc_RuntimeError, "R can only be initialized once.");
return NULL;
}
@@ -186,6 +174,18 @@
//FIXME: rpy has something to terminate R. Check the details of what they
are.
/* sanity checks needed ? */
+ /* snatched from trunk/rpy (v. 1.0) */
+ //FIXME: check all that
+ R_dot_Last();
+ R_RunExitFinalizers();
+ //CleanEd();
+ //KillAllDevices();
+
+ R_CleanTempDir();
+ //PrintWarnings();
+ R_gc();
+ /* */
+
Rf_endEmbeddedR((int)fatal);
globalEnv->sexp = R_EmptyEnv;
baseNameSpaceEnv->sexp = R_EmptyEnv;
@@ -1392,6 +1392,8 @@
};
+
+
/* A. Belopolsky's callback */
/* R representation of a PyObject */
@@ -1583,6 +1585,7 @@
ADD_INT_CONSTANT(m, RAWSXP);
ADD_INT_CONSTANT(m, S4SXP);
+ /* longuest integer for R indexes */
ADD_INT_CONSTANT(m, R_LEN_T_MAX);
/* "Logical" (boolean) values */
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list