Changes in rpy2
Release 2.0.4
Bugs fixed
- Added missing named parameter wantfun to method Renvironment.get()
(making it similar to SexpEnvironment.get())
- Leak in reference counting when creating SexpVector objects fixed
(the symptom was a process growing in size when creating R vector from
Python list or numpy arrays)
- R CMD config LAPACK_LIBS could return an empty string when R was compiled
with the veclib framework, causing the setup.py script to raise an exception.
setup.py now only print a message about an empty string returned from
R CMD config
- Numpy arrays with complex elements are now longer causing segfaults
Release 2.0.3
New features
- All callbacks are getting a get<callback> to complement the set<callback>.
(# patch submitted by Nathaniel Smith)
- process_revents(), a wrapper for R_ProcessEvents
(# suggested by June Kim to help with issues related to interactive display on win32),
and for R_RunHandlers on UNIX-like systems
(# patch by Nathaniel Smith).
- Sexp.__deepcopy__() to copy an object (calling Rf_Duplicate)
(# from a patch by Nathaniel Smith)
Changes
rpy2.rinterface:
- the default for reading and writing the console are now using sys.stdin and sys.stdout
(# patch submitted by Nathaniel Smith)
- console IO callbacks (reading and writing) are complemented by
one to flush the console
(# backport from 2.1-dev)
- Sexp.do_slot_assign() now creates the slot if missing
(design-fix - # patch by Nathaniel Smith)
Bugs fixed
- fixed problem with numpy interface with R boolean vectors.
They are now presented as ‘i’ rather than ‘b’ to numpy
(# patch submitted by Nathaniel Smith)
- The mechanism for setting arbitrary callaback functions for console I/O
now ensures that a traceback is printed to stderr whenever an error
occurs during the evalutation of the callback (the raised exception used
to be silently propagated to the next python call, leading to problems).
Release 2.0.2
Known problems
- Numpy arrays with complex or unicode elements seem to be now causing a
segfault
Bugs fixed
- Fix installation bug when the include directories contain either ‘-‘ or ‘I’
#spotted by James Yoo
- Failing to initialize R now throws a RuntimeError
- Copying an R “NA” into Python returns a None (and no longer a True)
(#fixes a bug reported by Jeff Gentry)
Release 2.0.1
New features
rpy2.robjects:
- Property names for the RVector methods getnames()
and setnames() (this was likely forgotten for Release 2.0.0).
- Property rclass for RObjectMixin
Bugs fixed
- Having the environment variable R_HOME specified resulted in an error
when importing rpy2.rinterface # root of the problem spotted by Peter
- Setup.py has no longer a (possibly outdated) static hardcoded version number
for rpy2
- Testing no longer stops with an error in the absence of the third-party
module numpy
- rpy2.rlike.container.TaggedList.pop() is now returning the element
matching the given index
Release 2.0.0
New features
- New module rpy2.robjects.conversion.
- New module rpy2.robjects.numpy2ri to convert numpy objects
into rpy2 objects.
# adapted from a patch contributed by Nathaniel Smith
Changes
rpy2.rpy_classic:
- rpy_classic.RObj.getSexp() moved to a
property rpy_classic.Robj.sexp.
rpy2.robjects:
- RObject.__repr__() moved to RObject.r_repr()
- ri2py(), ro2py(), and py2ri() moved to the new module
conversion. Adding the prefix conversion. to calls
to those functions will be enough to update existing code
Bugs fixed
- Informative message returned as RuntimeError when failing to find R’s HOME
- Use the registry to find the R’s HOME on win32
# snatched from Peter’s earlier contribution to rpy-1.x
Release 2.0.0rc1
New features
- added __version__ to rpy2/__init__.py
rpy2.robjects:
- added classes StrVector, IntVector, FloatVector, BoolVector
rpy2.rinterface:
- added missing class BoolSexpVector.
Changes
rpy2.robjects:
- does not alias rinterface.StrSexpVector, rinterface.IntSexpVector, rinterface.FloatSexpVector anymore
- Constructor for rpy2.robjects.RDataFrame checks that R lists are data.frames (not all lists are data.frame)
- Formerly new attribute _dotter for R is now gone. The documentaion now points to rpy2.rpy_classic for this sort of things.
Bugs fixed
- conditional typedef in rinterface.c to compile under win32 # reported and initial proposed fix from Paul Harrington
- __pow__ was missing from the delegator object for robjects.RVector (while the documentation was claiming it was there) # bug report by Robert Nuske
- Earlier change from Sexp.typeof() to getter Sexp.typeof was not reflected in rpy2.rpy_classic # bug report by Robert Denham
Release 2.0.0b1
New features
rpy2.robjects:
- added setenvironment() for RFormula, and defined environment as a property
- defined names as a property for RVector
rpy2.rinterface:
- added functions get_initoptions() and set_initoptions().
- new attribute _dotter for R singleton. Setting it to True will translate ‘_’ into ‘.’ if the attribute is not found
Changes
rpy2.robjects:
- constructor for RDataFrame now now accepts either rlike.container.TaggedList or rinterface.SexpVector
rpy2.rinterface:
- sexpTypeEmbeddedR() is now called str_typeint().
- initOptions is now called initoptions. Changes of options can only be done through set_initoptions().
Bugs fixed
- crash of Sexp.enclos() when R not yet initialized (bug report #2078176)
- potential crash of Sexp.frame() when R not yet initialized
- proper reference counting when handling, and deleting, Sexp.__sexp__ generated CObjects
- setup.py: get properly the include directories (no matter where they are) #bug report and fix adapted from Robert Nuske
- setup.py: link to external lapack or blas library when relevant
- added a MANIFEST.in ensuring that headers get included in the source distribution #missing headers reported by Nicholas Lewin-Koh
- rinterface.str_typeint() was causing segfault when called with 99
- fixed subsetting for LANGSXP objects
Release 2.0.0a3
New features
rpy2.rinterface:
- setReadConsole(): specify Python callback for console input
- R string vectors can now be built from Python unicode objects
- getter __sexp__ to return an opaque C pointer to the underlying R object
- method rsame() to test if the underlying R objects for two Sexp are the same.
- added emptyEnv (R’s C-level R_EmptyEnv)
- added method Sexp.do_slot_assign()
rpy2.robjects:
- R string vectors can now be built from Python unicode objects
rpy2.rlike:
- module functional with the functions tapply(), listify(), iterify().
- module indexing with the function order()
- method TaggedList.sort() now implemented
Changes
rpy2.rinterface:
- initEmbeddedR() is only initializing if R is not started (no effect otherwise, and no exception thrown anymore)
- the method Sexp.typeof() was replaced by a Python getter typeof.
- the method Sexp.named() was replaced by a Python getter named.
- R objects of type LANGSXP are now one kind of vector (... but this may change again)
- R objects of type EXPRSXP are now handled as vectors (... but this may change again)
- initEmbeddedR() renamed to initr()
- endEmbeddedR() renamed to endr()
rpy2.robjects:
- R remains a singleton, but does not throw an exception when multiple instances are requested
Bugs fixed
- unable to compile on Python2.4 (definition of aliases to Python2.5-specific were not where they should be).
- overflow issues on Python 2.4/64 bits when indexing R vector with very large integers.
- handling of negative indexes for SexpVector‘s __getitem__() and __setitem__() was missing
- trying to create an instance of SexpVector before initializing R raises a RuntimeException (used to segfault)
- experimental method enclos() was not properly exported
- setup.py was exiting prematurely when R was compiled against an existing BLAS library
- complex vectors should now be handled properly by rpy2.rinterface.robjects.
- methods rownames() and colnames() for RDataFrame were incorrect.
Release 2.0.0a2
New features
rpy2.rlike:
rpy2.rinterface:
- method named(), corresponding to R’s C-level NAMED
- experimental methods frame() and enclos() for SexpEnvironment corresponding to R’s C-level FRAME and ENCLOS
- method rcall() for ClosureSexp
- new experimental class SexpLang for R language objects.
Bugs fixed
- R stack checking is disabled (no longer crashes when multithreading)
- fixed missing R_PreserveObject for vectors (causing R part of the object to sometimes vanish during garbage collection)
- prevents calling an R function when R has been ended (raise RuntimeException).
Release 2.0.0a1
New features
rpy2.robjects:
- method getnames() for RVector
- experimental methods __setitem__() and setnames() for RVector
- method ‘getnames’ for RArray
- new class RFormula
- new helper class RVectorDelegator (see below)
- indexing RVector the “R way” with subset is now possible through a delegating attribute (e.g., myvec.r[True] rather than myvec.subset(True)). #suggested by Michael Sorich
- new class RDataFrame. The constructor __init__() is still experimental (need for an ordered dictionnary, that will be in before the beta
- filled documentation about mapping between objects
Changes
- many fixes and additions to the documentation
- improved GTK console in the demos
- changed the major version number to 2 in order to avoid confusion with rpy 1.x # Suggested by Peter and Gregory Warnes
- moved test.py to demos/example01.py
rpy2.robjects:
- changed method name getNames to getnames where available (all lower-case names for methods seems to be the accepted norm in Python).
Bugs fixed
rpy2.robjects:
- fixed string representation of R object on Microsoft Windows (using fifo, not available on win32)
- __getattr__() for RS4 is now using ri2py()
rpy2.rinterface:
- fixed context of evaluation for R functions (now R_GlobalEnv)