=============
New features
------------
- New class :class:`rpy2.robjects.SourceCode`. The class extends Python's
:class:`str` and is meant to represent R source code. An HTML
renderer for the ipython notebook (syntax highlighting using
:mod:`pygment` is also added).
- New module :mod:`rpy2.robjects.lib.tidyr` providing a custom
wrapper for the R library `tidyr`
- The long-deprecated functions :func:`rpy2.rinterface.set_writeconsole` and
:func:`rpy2.rinterface.get_writeconsole` are no longer available. One of
:func:`rpy2.rinterface.set_writeconsole_regular` / :func:`rpy2.rinterface.set_writeconsole_warnerror`
or :func:`rpy2.rinterface.get_writeconsole_regular` / :func:`rpy2.rinterface.get_writeconsole_warnerror`
respectively should be used instead.
- The attribute :attr:`rpy2.robjects.RObject.slots` can now be implictly interated on
(the method :meth:`__iter__` is now an alias for :meth:`keys`).
- The default Python-R conversion is now handling functions. This means that
Python function can directly be used as parameters to R functions (when
relevant).
- Ipython display hook `display_png` for ggplot2 graphics.
- :mod:`pandas` "category" vectors are better handled by the pandas conversion.
- New module :mod:`rpy2.robjects.lib.grdevices` providing a custom
wrapper for the R library 'grDevices', exposing few key functions in
the package and providing context managers (`render_to_file` and
`render_to_bytesio`) designed to simplify the handling of static plots
(e.g., webserver producing graphics on the fly or figure embedded in a
Jupyter notebook).
- Numpy conversion is handling better arrays with `dtype` equal to `"O"`
when all objects are either all inheriting from :class:`str` or from
:class:`bytes`. Such arrays are now producing :class:`StrSexpVector` or
:class:`BytesSexpVector` objects respectively.
- R's own printing of warnings if now transformed to warnings of type
`rinterface.RRuntimeWarning` (it used to be a regular `UserWarning`)
- The family of functions `src_*` and the function `tbl` in the R package
`dplyr` have aliases in the module :mod:`rpy2.robjects.lib.dplyr`, and
a class :class:`DataSource` has been added for convenience.
- :class:`rpy2.robjects.vectors.DataFrame` has a method `head` corresponding
to R's method of the same name. The method takes the n first row of a
data frame.
- dplyr's functions `count_` and `tally` are now exposed as methods for
the class :class:`dplyr.DataFrame`.
Changes
-------
- Building/installing rpy2 with a development version of R does not require
the use of option `--ignore-check-rversion` any longer. A warning is
simply issue when the R version is "development".
- On MSWindows, the dependency on `pywin32` was removed (issue 315)
- :class:`GroupedDataFrame` in the dplyr interface module is now inheriting
from the definition of DataFrame in that same module (it was previously
inheriting from :class:`robjects.vectors.DataFrame`).
- The default `repr()` for R objects is now printing the R classes
(as suggested in issue 349).
Bugs Fixed
----------
- Parameter names to R function that are in UTF-8 are no longer causing a
segfault (issue 332)
- Looking for a missing key in an R environment (using `__getitem__` or `[`)
could raise a `LookupError` instead of a `KeyError`.
- R environment can now handle unicode keys as UTF-8 (was previously
trying Latin1)
- rpy2 is interrupting attempts to install with Python < 2.7 with an
informative error message (issue 338)
- Setting the R class can be done by using a simple Python string (issue 341)
- `rpy2.robjects.lib.grid.viewport` is now returning an instance of class
`Viewport` (defined in the same module) (issue 350)