Rpy

Latest version: v0.99.2

Safety actively analyzes 627310 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 11 of 13

2.1.1

=============

Bugs fixed
----------

- Issues with NA values issue 37

- Missing manual scale functions in :mod:`rpy2.robjects.lib.ggplot2` issue 39

2.1.0

=============

New Features
------------

:mod:`rpy2.robjects`:

- Method :meth:`formals` for :class:`Function` (formerly *RFunction*)

- Methods :meth:`slotnames`, :meth:`isclass`, and :meth:`validobject`
for :class:`RS4`

- Vector-like objects now in a module :mod:`rpy2.robjects.vectors`

- :func:`set_accessors` for adding simply accessors to a class inheriting
from :class:`RS4`

- :class:`RS4_Type` for metaclass-declared accessors

- Delegating classes :class:`ExtractDelegator` and
:class:`DoubleExtractDelegator` for extracting the R-way

- :class:`DataFrame` (formerly *RDataFrame*) can now be created
from :`rlike.container.OrdDict`
instances, or any other object inheriting from dict.

- :class:`FactorVector` to represent R factors

- the conversion is now returning subclasses of
:class:`robjects.vectors.Vector` -formerly *RVector*-
(such as :class:`IntVector`,
:class:`FloatVector`, etc...) rather than only return :class:`Vector`

- :class:`StrVector` has a method :meth:`factor` to turn a
vector of strings into an R factor

- :class:`Matrix` was added the methods: :meth:`dot`, :meth:`svd`, :meth:`crossprod`,
:meth:`tcrossprod`, :meth:`transpose`.

- :meth:`IntVector.tabulate` to count the number of times a value is found in the vector

- :meth:`Vector.sample` to draw a (random) sample of arbitrary size from a vector

- :data:`NA_Bool`, :data:`NA_Real`, :data:`NA_Integer`, :data:`NA_Character`,
:data:`NA_Complex` as aliases for R's missing values.

- :data:`ComplexVector` for vectors of complex (real + imaginary) elements

- :mod:`packages` to provide utility functions to handle R packages
(import of R packages)

- :mod:`functions` to provide classes related to R functions, with the new
class :class:`SignatureTranslatedFunction`

- :meth:`DataFrame.iter_row` and :meth:`DataFrame.iter_column`, iterating
through rows and columns respectively.

- :meth:`DataFrame.cbind` and :meth:`DataFrame.rbind` for binding columns or
rows to a DataFrame.

- :meth:`Vector.iteritems` to iterate on pairs of names and values.

- :attr:`Robject.__rname__` to store the "R name"

:mod:`rpy2.rinterface`:

- New functions for specifying callback functions for R's front-ends:
:func:`set_showmessage`, :func:`set_flushconsole`,
:func:`set_choosefile`, :func:`set_showfiles`

- New object :data:`MissingArg`, exposing R's special object for representing
a "missing" parameter in a function call.
(this was first a patch by Nathaniel Smith with a function getMissingArgSexp)

- Initial commit of a callback-based implementation of an R graphical device
(this is for the moment very experimental - and not fully working)

- :meth:`SexpClosure.rcall` is now taking 2 parameters,
a tuple with the parameters and
an :class:`SexpEnvironment` in which the call is to be evaluated.

- :attr:`Sexp.__sexp__` now has a setter method. This permits the rebinding
of the underlying R SEXP, and allows to expose `foo<-` type of R methods
as Python function/methods with side effects.

- Objects of R type RAWSXP are now exposed as instances of class
:class:`SexpVector`.

- Factory function :func:`unserialize` to build Sexp* instances from byte
string serialized with R's own 'serialize'.

- Method :meth:`Sexp.__reduce__` for pickling/unpickling

- Ability to specify a callback function for R_CleanUp (called upon exiting R)
through :func:`get_cleanup` and :func:`set_cleanup` [very experimental]

- Class :class:`ListSexpVector` for creating R lists easily
(complementing :class:`IntSexpVector`, :class:`StrSexpVector`, and friends)

- :meth:`colnames`, :meth:`rownames` for :class:`Array` (formerly *RArray*) are now
property-style getters

- Pairlists (LISTSXP) now handled

- Experimental function :func:`set_interactive` to set whether R is in interactive
mode or not (following an issue reported by Yaroslav Halchenko)

- New object :data:`R_NilValue`, exposing R's special object for representing
a "NULL".

- :data:`ComplexSexpVector` for vectors of complex (real + imaginary) elements

- Scalar Python parameters of type :class:`int`, :class:`long`,
:class:`double`, :class:`bool`, and :class:`None`
in a call (using :class:`SexpClosure`) are now automatically converted
to length-one R vectors (at the exception of None, converted
to R_NilValue).

- Python slices can now be used on R vector-like objects

- Better handling of R's missing values NA, `NA_integer_`, `NA_real_`,
and `NA_character_`.

:mod:`rpy2.rlike`:

- :meth:`iteritems` for :class:`OrdDict` (formerly:class:`ArgDict`)
and :class:`TaggedList`

- static method :meth:`from_iteritems` for :class:`TaggedList`,
for creating a TaggedList from any object having a method :meth:`iteritems`


Changes
-------

- The setup.py script is now taking command-line arguments when specifying
R library-related paths are wished. python setup.py --help build_ext will
list them

:mod:`rpy2.robjects`:

- RS4 no longer makes R's slots as Python attributes through :meth:`__attr__`

- The package is split into modules

- The broken variables NA_STRING, NA_INTEGER, NA_LOGICAL, and NA_REAL are
removed. The documentation on missing values was revised.

- :data:`globalEnv` and :data:`baseNameSpaceEnv` were renamed to
:data:`globalenv` and :data:`baseenv` respectively

- The parameter *wantFun* in :meth:`Environment.get`
(formerly *REnvironment.get()*) is now *wantfun*

- :attr:`Vector.r` does not have a __getitem__ method any longer
(see in `.rx` and `.rx2` in the new features)

- :meth:`colnames`, :meth:`rownames`, :meth:`nrow`, :meth:`ncol`
for :class:`DataFrame` are now property-style getters

- :meth:`nrow`, :meth:`ncol` for :class:`Array`
are now property-style getters

- static method :meth:`from_csvfile` and
instance method :meth:`to_csvfile` for :class:`DataFrame`

- module :mod:`lib` to store modules representing R packages

- module :mod:`lib.ggplot2` for the CRAN package ggplot2.

- renaming of few classes, the *R* prefix: :class:`Formula` (from *RFormula*),
:class:`DataFrame` (from *RDataFrame*), :class:`Array` (from *RArray*),
:class:`Matrix` (from *RMatrix*), :class:`Environment` (from *REnvironment*),
:class:`Function` (from *RFunction*), :class:`Vector` (from *RVector*).

- :class:`robjects.vectors.Vector` lost the (now redundant) methods
`subset` and `assign`. Those operations were just aliases to the
:class:`ExtractDelegator`

:mod:`rpy2.rinterface`:

- :data:`globalEnv`, :data:`baseNameSpaceEnv`, and :data:`emptyEnv`
were renamed to :data:`globalenv`, :data:`baseenv` and :data:`emptyenv`
respectively

- The parameter *wantFun* in :meth:`SexpEnvironment.get` is now *wantfun*

- The call-back getters and setters are now :func:`get_readconsole`,
:func:`set_readconsole`, :func:`get_writeconsole`, :func:`set_writeconsole`,
:func:`get_flushconsole`, and :func:`set_flushconsole`.

- Functions also accept named parameters equal to Py_None, and transform them to R
NULL (previously only accepted parameters inheriting from Sexp).

:mod:`rpy2.rlike`:

- :class:`ArgDict` becomes :class:`OrdDict`.

- :meth:`tags` of :class:`TaggedList` is now a property (with a getter
and a setter)

:mod:`rpy2.rpy_classic`:

- R named lists are returned as Python :class:`dict`, like rpy-1.x does it, with the
notable difference that duplicate names are not silently overwritten: an exception
of class :class:`ValueError` is thrown whenever happening


Bugs fixed
----------

- :meth:`REnvironment.get` now accepts a named parameter *wantFun*
(like :meth:`rinterface.SexpEnvironment` does)

- :class:`rinterface.SexpVector` will now properly raise an exception
when trying to create vector-like object of impossible type

- Crash when trying to create a SexpVector of a non-vector type

- R objects of class *matrix* are now properly converted into :class:`RMatrix`
(instead of :class:`Array`)

- :meth:`Robj.as_py` was not working at all (and now it does to some extent)

2.0.7

=============

Bugs fixed
----------

- On win32, printing an object was leaving an open file handle behind each time,
leading to an error and the impossibility to print
( bug report and fix by Christopher Gutierrez)

2.0.6

=============

No user-visible change. Win32-specific additions to the C module
were made to compile it.

2.0.5

=============

Bugs fixed
----------

- Crash when calling :meth:`SexpEnvironment.get` with an empty string
bug report by Walter Moreira

- :meth:`SexpEnvironment.__getitem__` called with an empty string
caused unpredictable (and bad) things

2.0.4

=============

Bugs fixed
----------

- Added missing named parameter *wantfun* to method :meth:`REnvironment.get`
(making it similar to :meth:`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 no longer causing segfaults

- Calls to :meth:`SexpClosure.rcall` with something else that the expected
kind of tuple could cause a segfault

Page 11 of 13

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.