forked from randy3k/rpy2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NEWS
2214 lines (1378 loc) · 60.8 KB
/
NEWS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Release 3.0.1
=============
Bugs fixed
----------
- Script to install R packages for docker image never made it to version
control.
- Conversion of R arrays/matrices into numpy object trigged a segfault
during garbage collection (issue #524).
Release 3.0.0
=============
New features
------------
- rpy2 can be installed without a development environment.
- Unit tests are now relying on the Python module `pytest`.
- :attr:`rpy2.rinterface.NA_Integer` is now only defined when the embedded R
is initialized.
Changes
-------
- complete rewrite of :mod:`rpy2.rinterface`.
:mod:`cffi` is now used to interface with the R compiled shared library.
This allows ABI calls and removes the need to compile binaries. However, if
compilation is available (when installing or preparing pre-compiled binaries)
faster implementations of performance bottlenecks will be available.
- calling :func:`rpy2.rinterface.endr` multiple times is now only ending R
the first time it is called (note: an ended R cannot successfully be
re-initialized).
- The conversion system in the mod:`rpy2.robjects.conversion` now has only
two conversions `py2rpy` and rpy2py`. `py2rpy` tries to convert any
Python object into an object rpy2 can use with R and `rpy2py` tries
to convert any rpy2 object into a either a non-rpy2 Python object or
a mod:`rpy2.robjects` level object.
- The method `get` for R environments is now called `find()` to avoid
confusion with the method of the same name in Python (:meth:`dict.get`).
- :class:`rpy2.robjects.vectors.Vector`, :class:`rpy2.robjects.vectors.Matrix`,
and :class:`rpy2.robjects.vectors.Array` can no longer be used to create
R arrays of unspecified type. New type-specific classes (for example for
vectors :class:`rpy2.robjects.vectors.IntVector`,
:class:`rpy2.robjects.vectors.BoolVector`,
:class:`rpy2.robjects.vectors.FloatVector`,
:class:`rpy2.robjects.vectors.ComplexVector`, or
:class:`rpy2.robjects.vectors.StrVector`) should be used instead.
- mod:`rpy2.rpy_classic`, an implementation of the `rpy` interface using
:mod:`rpy2.rinterface` is no longer available.
- :class:`rpy2.robjects.ParsedCode` and
:class:`rpy2.robjects.SourceCode` are moved to
:class:`rpy2.robjects.packages.ParsedCode` and
:class:`rpy2.robjects.packages.SourceCode`.
Bugs fixed
----------
- Row names in R data frames were lost when converting to pandas data frames
(issue #484).
Known issues
------------
- Mismatch between R's POSIXlt `wday` and Python time struct_time's `tm_wday`
(issue #523).
Release 2.9.6
=============
Bugs fixed
----------
- Latest release of :mod:`pandas` deprecated :meth:`DataFrame.from_items`.
(issue #514).
- Latest release of :mod:`pandas` requires categories to be a list
(not an other sequence).
Known issues
------------
- The numpy buffer implemented by R arrays is broken for complex numbers
Release 2.9.5
=============
Bugs fixed
----------
- Missing values in pandas :class:`Category` series were creating
invalid R factors when converted (issue #493).
Release 2.9.4
=============
Bugs fixed
----------
- Fallback for failure to import numpy or pandas is now dissociated from
failure to import :mod:`numpy2ri` or :mod:`pandas2ri` (issue #463).
- :func:`repr` for R POSIX date/time vectors is now showing a string
representation of the date/time rather than the timestamp as a float
(issue #467).
- The HTML representation of R data frame (the default representation in the
Jupyter notebook) was displaying an inconsistent number of rows
(found while workin on issue #466).
- Handle time zones in timezones in Pandas when converting to R data frames
(issue #454).
- When exiting the Python process, the R cleanup is now explicitly request
to happen before Python's exit. This is preventing possible segfaults
the process is terminating (issue #471).
- dplyr method `ungroup()` was missing from
:class:`rpy2.robjects.lib.dplyr.DataFrame` (issue #473).
Release 2.9.3
=============
Bugs fixed
----------
- Delegate finding where is local time zone file to either a user-specified
module-level variable `default_timezone` or to the third-party
module :mod:`tzlocal` (issue #448).
Release 2.9.2
=============
Changes
-------
- The pandas converter is converting :class:`pandas.Series` of `dtype` `"O"`
to :class:`rpy2.robjects.vectors.StrVector` objects, issueing a warning
about it (See issue #421).
- The conversion of pandas data frame is now working with columns rather
than rows (introduce in bug fix for issue #442 below) and this is expected
to result in more efficient conversions.
Bugs fixed
----------
- Allow floats in figure sizes for R magic (Pull request #63)
- Fixed pickling unpickling of robjects-level instances,
regression introduced in fix for issue #432 with release 2.9.1 (issue #443).
- Fixed broken unit test for columns of `dtype` `"O"` in `pandas` data frames.
- Fixed incorrect conversion of R factors in data frames to columns of
integers in pandas data frame (issue #442).
Release 2.9.1
=============
Changes
-------
- Fixing issue #432 (see Section Bugs fixed below) involved removed the method
`__reduce__` previously provided for all rpy2 objects representing R objects.
Bugs fixed
----------
- An error when installing with an unsupported R version was fixed (issue #420).
- The docstring for `rinterface.endr()` was improperly stating that the function was not taking
any argument (issue #423).
- Target version of dplyr and tidyr are now 0.7.4 and 0.7.2 respectively.
- Fixed memory leak when pickling objects (issue #432). Fixing the leak caused a
slight change in the API (see Section Changes above).
- Conversion to :mod:`pandas` now handling R ordered factor (issue #398).
- :mod:`jinja2` was not listed as a dependency (issue #437).
Release 2.9.0
=============
New features
------------
- New module :mod:`rpy2.situation` to extract and report informations
about the environment, such as where is the R HOME, what is the
version of R, what is the version of R rpy2 was built with, etc...
The module is also designed to be run directly and provide diagnostics:
`python -m rpy2.situation`.
- :meth:`Environment.values`, :meth:`Environment.pop`,
:meth:`Environment.popitems`, :meth:`Environment.clear`
to match :meth:`dict.values`,
:meth:`dict.pop`, :meth:`dict.popitems`, :meth:`dict.clear`.
- :class:`VectorOperationsDelegator` now has a method `__matmul__` to implement
Python's matrix multiplication operator (PEP-0645).
- A rule to convert R POSIXct vectors to pandas Timestamp vectors was added (issue #418).
- method :meth:`_repr_html_` for R vectors to display HTML in jupyter.
Changes
-------
- Starting several times the singleton :class:`EventProcessor` longer results
in a :class:`RuntimeError`. This is now only a warning, addressing
issue #182.
- The target version for the R package `dplyr` mapped is now 0.7.1, and
:func:`rpy2.robjects.lib.dplyr.src_dt` (issue #357) and
:func:`rpy2.robjects.lib.dplyr.src_desc` are no longer present.
- :meth:`Environment.keys` is now a iterator to match :meth:`dict.keys`,
also an interator in Python 3.
- Target version of `ggplot2` library is 2.2.1.
- Option `stringsasfactors` in the constructor for the class `DataFrame`. If `False`, the
strings are no longer converted to factors. When converting from pandas data frames
the default is to no longer convert columns of strings to factors.
- The R "magic" for jupyter is now more consistently using the conversion system, and the
use of custom converters through the magic argument `-c` will work as expected.
- Docker-related files moved to directory docker/ (where variants image for rpy2 are available)
Bugs fixed
----------
- :func:`numpy.float128` is not available on all platforms. The unit test
for it is now skipped on systems where it is not present (issue #347)
- R pairlist objects can now be sliced (and issue #380 is resolved).
- Passing parameters names that are empty string to R function was
causing a segfault (issue #409).
- Trying to build an atomic R vector from a Python object that has a length,
but it not a sequence nor an iterator was causing a segfault (issue #407).
Release 2.8.6
=============
Bugs fixed
----------
- Trying to build an atomic R vector from a Python object that has a length,
but it not a sequence nor an iterator was causing a segfault (issue #407 -
backport from rpy2-2.9.0).
Release 2.8.5
=============
Bugs fixed
----------
- The defintion of the method :class:`rpy2.rlike.container.OrdDict.items`
was incorrect, and so was the documentation for `rcall` (issue #383)
- Giving an empty sequence to :meth:`robjects.sequence_to_vector` is now
raising a :class:`ValueError` rather than fail with an
:class:`UnboundLocalError` (see issue #388).
- :meth:`robjects.robject.RSlots.items` is now working (see pull request #57).
Release 2.8.4
=============
Bugs fixed
----------
- The context manager :func:`rpy2.robjects.lib.grdevices.render_to_file`
is no longer trying to impose a file name generated by :mod:`tempfile`
(issue #371)
- The symbol `LISTSXP` (corresponding to R pairlist objects) was not
imported from the C module in rpy2.
- The functions `scale_linetype_discrete` and `scale_linetype_continuous`
in ggplot2 were not wrapped by :mod:`rpy2.robjects.lib.ggplot2`
(issue #381)
Release 2.8.3
=============
Bugs fixed
----------
- Fixed the error when the transformation of R "man" pages into Python
docstrings was failing when the section "arguments" was missing
(issue #368)
- Failing to find R in the PATH during the installation of rpy2
is now printing an error message instead of a warning (issue #366)
Release 2.8.2
=============
Bugs fixed
----------
- R's `dplyr::src_dt` was moved to `dtdplyr::src_dt` with `dplyr` release 0.5.0.
To address this, `src_dt` will become a `None` if the R package `dplyr` is
discovered to be of version >= 0.5.0 at runtime. (issue #357)
- Conversion issue when R symbols were accessed as attribute of the singleton
:class:`rpy2.robjects.R`. (issue #334)
- The `rmagic` extension for `ipython` was no longer loading with the latest
ipython (version 5.0.0). (issue #359)
Changes
-------
- The fix to issue #357 (see bugs fixed above) was expanded to cover all
R packages wrapped in :mod:`rpy2.robjects.lib` and ensure that the respective
Python modules can loaded even if symbols are no longer defined in future
versions of the corresponding R packages.
Release 2.8.1
=============
New features
------------
- `Dockerfile` with automated build on dockerhub (https://hub.docker.com/r/rpy2/rpy2)
Bugs Fixed
----------
- Trying to install rpy2 while R is not in the `PATH` resulted in an error
in `setup.py`.
Release 2.8.0
=============
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)
Release 2.7.9
=============
Bug fixed
---------
- Python objects exposed to R could lead to segfault when the Python process is
exiting (issue #331)
Release 2.7.8
=============
Bugs fixed
----------
- American English spelling was missing for some of the function names
to specify colour (color) scales.
- Fix for printing R objects on Windows (pull request #47)
Release 2.7.7
=============
Bugs fixed
----------
- Pickling `robjects`-level objects resulted in `rinterface`-level objects
when unpickled (issue #324).
Release 2.7.6
=============
Changes
-------
- :mod:`rpy2.robjects.lib.ggplot2` was modified to match the newly released
ggplot2-2.0.0. This is introducing API-breaking changes, which breaks the
promise to keep the API stable through bugfix releases within series, but
without it 2.7.x will not a work with new default installation of the R
package ggplot2.
Release 2.7.5
=============
Bugs fixed
----------
- Division and floordivision through the delegator `.ro` provided with
R vectors wrapped by `robjects`. (issue #320)
- Memory leak when unserializing (unpickling) R objects bundled in Python
objects (issue #321)
Release 2.7.4
=============
Bugs fixed
----------
- Python 3.5 highlighted slightly incorrect C-level flags in rpy2 objects
declarations, and :mod:`rpy2.robjects` could not be imported.
- Fixed unit tests for rmagic when :mod:`numpy` is not installed, and
for :mod:`numpy` is installed by :mod:`pandas` in missing.
Release 2.7.3
=============
Bugs fixed
----------
- method :meth:`DataFrame.collect` in :mod:`rpy2.robjects.lib.dplyr`
was not functioning.
- Applied patch by Matthias Klose to fix implict pointer conversions.
- :mod:`pandas2ri.ri2py_dataframe` is now propagating the row names
in the R data frame into an index in the pandas data frame (issue #285)
- methods `union`, `intersect`, `setdiff`, `ungroup` defined in the R package
`dplyr` were missing from the
`DataFrame` definition in :mod:`rpy2.robjects.lib.dplyr`
Release 2.7.2
=============
Bugs fixed
----------
- methods `distinct`, `sample_n`, and `sample_frac` defined in the R package
`dplyr` were missing from the `DataFrame` definition in
:mod:`rpy2.robjects.lib.dplyr`
- The fix for the inheritance problem with
:mod:`rpy2.robjects.lib.dplyr.DataFrame` introduced a regression whenever
`group_by` is used.
- The methods to perform joins on dplyr `DataFrame` objects where not
working properly.
Release 2.7.1
=============
Bugs fixed
----------
- The :meth:`__repr__` for :mod:`robjects`-level vectors
was broken for vectors of length 1 (issue #306)
- The ipython notebook-based sections of the documentation
were not building
- Classes inheriting from :mod:`dplyr.DataFrame` had dplyr methods
returning objects of their parent class.
Release 2.7.0
=============
New features
------------
- New exception :class:`rpy2.rinterface.RParsingError`. Errors
occurring when parsing R code through :func:`rpy2.rinterface.parse`
raise this exception (previously :class:`rpy2.rinterface.RRuntimeError`).
- New class :class:`rpy2.robjects.conversion.Converter` to replace
the `namedtuple` of the same name
- New class :class:`rpy2.robjects.converter.ConversionContext`. This is
a context manager allowing an easy setting of local conversion rules.
The constructor has an alias called
:meth:`rpy2.robjects.constructor.localconverter`.
- New module :mod:`rpy2.robjects.lib.dplyr` providing a custom
wrapper for the R library `dplyr`
- Method :meth:`Environment.items()` to iterate through the symbols
and associated objects in an R environment.
- Exception :class:`rpy2.rinterface.ParsingIncompleError`, a child class of
:class:`rpy2.rinterface.ParsingError`, raised when
calling :meth:`rpy2.rinteface.parse` results in R's C-level status
to be `PARSE_INCOMPLETE`. This can make the Python implementation of an
IDE for R easier.
- Attribute :attr:`slots` for :mod:`rpy2.robjects`-level objects. The
attribute is a :class:`rpy2.robjects.Rslots` which
behaves like a Python mapping to provide access to R-attributes
for the object (see issue #275).
- The R "magic" for ipython `%%R` can be passed a local converter
(see new features above) by using `-c`.
Bugs fixed
----------
- Conversion rules were not applied when parsing and evaluating string
as R with :class:`rpy2.robjects.R`.
- Calling the constructor for :class:`rpy2.robjects.vectors.FactorVector`
with an R factor is no longer making a copy, loosing the associated
R attributes if any (fixes issue #299).
- `rpy2` could crash when R was unable to dynamically load the C extension for
one of its packages (noticed with issue #303).
Changes
-------
- :func:`rpy2.rinterface.is_initialized` is now a function.
- :meth:`rpy2.robjects.R.__call__` is now calling R's `base::parse()`
to parse the string rather the parser through R's C-API. The workaround
let's us retrieve R's error message in case of failure (see issue #300)
Release 2.6.3
=============
Bug fixed
---------
- Metaclass `RS4Auto_Type` facilitating the creation of Python
classes from R S4 classes was not handling classes without
methods (issue #301)
Release 2.6.2
=============
Bugs fixed
----------
- Check that R >= 3.2 is used at build time (issue #291)
- Conversion rules were not applied when parsing and evaluating string
as R code with :class:`rpy2.robjects.R`.
Release 2.6.1
=============
New features
------------
- Because of their long names, the classes
:class:`SignatureTranslatedAnonymousPackage`,
:class:`SignatureTranslatedPackage`, and
:class:`SignatureTranslatedFunction`
in :mod:`rpy2.robjects.packages` have now the aliases
:class:`STAP`, :class:`STP`, and :class:`STF` respectively.
Bugs fixed
----------
- Typo in function name emitting warnings at build time (issue #283)
- The conversion of `TaggedList` instances is now handling the names
of items in the list (issue #286)
Changes
-------
- Loading the `ipython` extension in the absence of `pandas` or `numpy`
is now issuing a warning (issue #279)
Release 2.6.0
=============
New features
------------
- Report the existence during build time of a file `.Renviron`,
or the definition of the environment variables `R_ENVIRON' or
`R_ENVIRON_USER` with a warning. (issue #204)
- Moved console writting callback to use `ptr_R_WriteConsoleEx`
rather than `ptr_R_WriteConsole`. This allows callbacks
for warnings and messages. `get/set_writeconsole` is now
replaced by `get/set_writeconsole_regular` (regular
output) and `get/set_writeconsole_warnerror` (warning and error).
In order to conserve backward compatibility an alias for
`get/set_writeconsole_regular` called `get/set_writeconsole` is
provided.
- Added callback for `ptr_R_ResetConsole`.
- :mod:`pandas` :class:`Categorical` objects are automatically handled
in the pandas converter.
- The translation of R symbols into Python symbols used in `importr` and
underlying classes and methods can be customized with a callback.
The default translation turning `.` into `_` is `default_symbol_r2python`.
- Translation of named arguments in R function is now sharing code with the
translation of R symbols (see point above), providing a consistent way to
perform translations.
- Utility function `sequence_to_vector` in `robjects` to convert Python
sequences (e.g., `list` or `tuple`) to R vector without having to
specify the type (the type is inferred from the list).
- :mod:`robjects.vectors` object have a property :attr:`NAvalue` that contains
the `NA` value for the vector, allowing generic code on R vectors.
For example, testing whether any vector contains `NA` can be written as
`any(x is myvector.NAvalue for x in myvector)`. Making numpy /masked/ array
is an other application.
Changes
-------
- The automatic name translation from R to Python used in `importr` is
now slightly more complex. It will not only translate `.` to `_` but
should a conflict arise from the existence in R of both the `.` and `_`
versions the `.` version will be appended a `_` (in accordance with
:pep:0008). The change was discussed in issue #274).
- The ipython 'R magic' is now starting with a default conversion mode
that is `pandas2ri` if it can find it, then `numpy2ri` if it can find it,
and then the basic conversion.
- R vectors are now typed at the C level (IntSexpVector, FloatSexpVector,
ListSexpVector, etc...) whenever retrieving them from the embedded R
with the low-level `rinterface`. This is facilitating dispatch on vector
type (e.g., with `singledispatch` now used for the conversion system).
Bugs fixed
----------
- The evaluation of R code through R's C-level function `tryEval`
caused console output whenever an error occurred. Moving to
the seemingly experimental `tryEvalSilent` makes evaluations less
verbose.
- Multiple plots in one ipython cell (pull request #44)
Release 2.5.7
=============
- `simplegeneric` was moved of ipython 4.0.0 (pull request #43)
Release 2.5.6
=============
Bugs fixed
----------
- Detection of the R version during setup on Win8 (issues #255 and #258)
- Segmentation fault when converting :mod:`pandas` :class:`Series` with
elements of type object (issue #264)
- The default converter from Python (non-rpy2) objects to rinterface-level
objects was producing robjects-level objects whenever the input was of
type :class:`list` (discovered while fixing issue #264)
- Implemented suggested fix for issue with unlinking files on Windows
(issue #191)
- Testing rpy2 in the absence of ipython no longer stops with an error
(issue #266)
Release 2.5.5
=============
Bugs fixed
----------
- Crash (segfault) when querying an R object in an R environment triggers an
error (symbol exists, but associated values resolves to an error - issue #251)
- Change in the signature of `rcall` was not updated in the documentation
(issue #259)
- Minor update to the documentation (issue #257)
Release 2.5.4
=============
Bugs fixed
----------
- Filter PNG files on size, preventing empty files causing trouble to be
ipython notebook rendering of graphics later on (slight modification of
the pull request #39)
- Fix installation left unresolved with rpy2-2.5.3 (issue #248)
- Possible segfault with Python 3.4 (issue #249)
Release 2.5.3
=============
Changes
-------
- `setup.py` has `install_requires` in addition to `requires` in the hope to
fix the missing dependency with Python 2 (:mod:`singledispatch` is required
but not installed).
Bugs fixed
----------
- Extracting configuration information from should now work when R is emitting a warning (issue #247)
- On OS X the library discovery step can yield nothing (see issue #246). A tentative fix is to issue
a warning and keep moving.
Release 2.5.2
=============
Bugs fixed
----------
- String representation of :class:`robjects.R` (issue #238)
- Check during `build_ext` if unsupported version of R (pull request #32)
- HTMl display of columns of factors in a DataFrame (issue #236)
- HTML display of factors (issue #242)
Release 2.5.1
=============
Bugs fixed
----------
- Require singledispatch if Python 3.3 (issue #232)
- Fixed bug when R spits out a warning when asked configuration information (issue #233)
- Restored printing of compilation information when running `setup.py`
- Fixed installation issue on some systems (issue #234)
- Workaround obscure failure message from unittest if Python < 3.4 and
:mod:`singledispatch` cannot be imported (issue #235)
Release 2.5.0
=============
New features
------------
- Experimental alternative way to preserve R objects from garbage collection.
This can be activated with `rinterface.initr(r_preservehash=True)` (default
is `False`.
- :class:`GGPlot` object getting a method :meth:`save`
mirroring R's `ggplot2::ggsave()`.
- The conversion system is now using generics/single dispatch.
- New module :mod:`rpy2.ipython.html` with HTML display for rpy2 objects
- [Experimental] New function :func:`robjects.methods.rs4instance_factory`
to type RS4 objects with more specificity.
Changes
-------
- The script `setup.py` was rewritten for clarity and ease of maintenance.
Now it only uses `setuptools`.
Release 2.4.4
=============
Bugs fixed
----------
- Use `input` rather than `raw_input` in the default console callback
with Python 3 (fixes issue #222)
- Issues with conversions, pandas, and rmagic (fixes issue #218 and more)
Release 2.4.3
=============
Bugs fixed
----------
- `geom_raster` was missing from `rpy2.robjects.lib.ggplot2` (pull request #30)
- Fixed issue with SVG rendering in ipython notebook (issue #217)
- Regression with `rx2()` introduced with new conversion (issue #219)
- Fixed documentation (missing `import`) (issue #213)
Release 2.4.2
=============
Bugs fixed
----------
- Assigning an R `DataFrame` into an environment was failing if
the conversion for Pandas was activated. (Issue #207)
Release 2.4.1
=============
Bugs fixed
----------
- :meth:`rpy2.ipython` fixed spurious output to notebook cells.
Release 2.4.0
=============
Changes
-------
- Conversion system slightly changed, with the optional
conversions for :mod:`numpy` and :mod:`pandas` modified
accordingly. The changes should only matter if using
third-party conversion functions.
- The Python 3 version is now a first class citizen. `2to3`
is no longer used, and the code base is made directly
compatible with Python. This lowers significantly the
installation time with Python 3
(which matters when developping rpy2).
- The default options to initialize R (`rpy2.rinterface.initoptions') are no longer
`('rpy2', '--quiet', '--vanilla', '--no-save')` but now
`('rpy2', '--quiet', '--no-save')`.
- :class:`robjects.vectors.ListVector` can be instanciated from
any objects with a method `items()` with the expectation that the method
returns an iterable of (name, value) tuples, or even be an iterable
of (name, value) tuples.
New features
------------
- For instances of :class:`rpy2.robjects.Function`,
the `__doc__` is now a property fetching information
about the parameters in the R signature.
- Convenience function :func:`rpy2.robjects.packages.data`
to extract the datasets in an R pacakges
- :mod:`ipython`'s `rmagic` is now part of :mod:`rpy`. To use, `%load_ext
rpy2.ipython` from within IPython.
- new method :meth:`rpy2.rinterface.SexpEnvironment.keys`, returnings
the names in the environment as a tuple of Python strings.
- convenience class :class:`robjects.packages.InstalledPackages`, with a companion function
:func:`robjects.packages.isinstalled`.
- new class :class:`rinterface.SexpSymbol` to represent R symbols
Bugs fixed
----------