Revision: 537
http://rpy.svn.sourceforge.net/rpy/?rev=537&view=rev
Author: lgautier
Date: 2008-05-28 22:24:24 -0700 (Wed, 28 May 2008)
Log Message:
-----------
- fixed null environment case (now defunct)
- added a bit of documentation
Modified Paths:
--------------
branches/rpy_nextgen/doc/source/rinterface.rst
branches/rpy_nextgen/rpy/rinterface/rinterface.c
Modified: branches/rpy_nextgen/doc/source/rinterface.rst
===================================================================
--- branches/rpy_nextgen/doc/source/rinterface.rst 2008-05-28 04:46:53 UTC
(rev 536)
+++ branches/rpy_nextgen/doc/source/rinterface.rst 2008-05-29 05:24:24 UTC
(rev 537)
@@ -18,7 +18,7 @@
>>> import rpy2.rinterface as rinterface
.. index::
- single: initialize
+ single: initEmbeddedR
:func:`initEmbeddedR`
---------------------
@@ -44,6 +44,9 @@
The :class:`Sexp_Type` objects can be considered as Python enveloppes pointing
to data stored and administered in the R space.
+.. index::
+ single: globalEnv
+
globalEnv
---------
@@ -59,6 +62,20 @@
The library is said to be attached to the current search path.
.. index::
+ single: baseNamespaceEnv
+
+baseNamespaceEnv
+----------------
+
+The base package has a namespace, that can be accessed as an environment.
+
+.. note::
+ Depending on what is in globalEnv and on the attached packages, base
+ objects can be masked when starting the search from globalEnv. Use this
+ environment when you want to be sure to access a function you know to be
+ in the base namespace.
+
+.. index::
single: Sexp
:class:`Sexp`
@@ -261,3 +278,47 @@
>>> [x for x in envplot_ls]
>>>
+
+Misc. variables
+===============
+
+.. index::
+ single: R_LEN_T_MAX
+
+
+R_HOME
+ R HOME
+
+R_LEN_T_MAX
+ largest usable integer for indexing R vectors
+
+TRUE/FALSE
+ R's TRUE and FALSE
+
+NA_INTEGER
+ NA value for integers
+
+NA_LOGICAL
+ NA value for booleans
+
+NA_REAL
+ NA value for numerical values (float / double)
+
+INTSXP
+ Integer
+
+REALSXP
+ Numerical value (float / double)
+
+LGLSXP
+ Boolean (logical in the R terminology)
+
+STRSXP
+ String
+
+ENVSXP
+ Environment
+
+CPLXSXP
+ Complex
+
Modified: branches/rpy_nextgen/rpy/rinterface/rinterface.c
===================================================================
--- branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-05-28 04:46:53 UTC
(rev 536)
+++ branches/rpy_nextgen/rpy/rinterface/rinterface.c 2008-05-29 05:24:24 UTC
(rev 537)
@@ -590,7 +590,13 @@
SEXP res_R = NULL;
int error = 0;
PyOS_sighandler_t old_int;
-
+
+
+ //FIXME: if env_R is null, use R_BaseEnv
+ if (isNull(env_R)) {
+ env_R = R_BaseEnv;
+ }
+
/* Enable our handler for SIGINT inside the R
interpreter. Otherwise, we cannot stop R calculations, since
SIGINT is only processed between Python bytecodes. Also, save the
@@ -1715,7 +1721,7 @@
static PyObject*
EmbeddedR_sexpType(PyObject *self, PyObject *args)
{
-
+ /* Return the C-defined name for R types */
int sexp_i;
if (! PyArg_ParseTuple(args, "i", &sexp_i)) {
@@ -1736,7 +1742,6 @@
}
-
/* --- List of functions defined in the module --- */
static PyMethodDef EmbeddedR_methods[] = {
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
rpy-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rpy-list