/
NEWS.Rd
4642 lines (3582 loc) · 198 KB
/
NEWS.Rd
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
\newcommand{\PR}{\Sexpr[results=rd]{tools:::Rd_expr_PR(#1)}}
\newcommand{\Rlogo}{\if{html}{\figure{../html/logo.jpg}}\if{latex}{\figure{logo.jpg}{options: width=0.5in}}}
\name{NEWS}
\title{ R News}
\encoding{UTF-8}
\section{\Rlogo CHANGES IN R-devel}{
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\item The \code{yLineBias} of the \code{X11()} and
\code{windows()} families of devices has been changed from 0.1 to
0.2: this changes slightly the vertical positioning of text in the
margins (including axis annotations). This is mainly for
consistency with other devices such as \code{quartz()} and
\code{pdf()}. (Wish of \PR{14538}.)
There is a new graphics parameter \code{"ylbias"} which
allows the y-line bias of the graphics device to be tweaked,
including to reproduce output from earlier versions of \R.
\item Labeling of p-values in various anova tables has been
rationalized to be either \code{"Pr(>F)"} or \code{"Pr(>Chi)"}
(i.e. the \code{"Pr(F)"}, \code{"Pr(Chi)"} and \code{"P(>|Chi|)"}
variants have been eliminated). Code which extracts the p value
\emph{via} indexing by name may need adjustment.
}
}
\subsection{NEW FEATURES}{
\itemize{
\item \code{txtProgressBar()} can write to an open connection
instead of the console.
\item Non-portable package names ending in \file{.} are no longer
allowed. Nor are single-character package names (\pkg{R} was
already disallowed).
\item \code{regexpr()} and \code{gregexpr()} with \code{perl =
TRUE} allows Python-style named captures. (Wish and
contribution of \PR{14518}.)
\item The placement of plotmath text in the margins of plots done
by base graphics now makes the same vertical adjustment as
ordinary text, so using ordinary and plotmath on the same margin
line will seem better aligned (but not exactly aligned, since
ordinary text has descenders below the baseline and plotmath
places them on the baseline). (Related to \PR{14537}.)
\item \code{sunflowerplot()} now has a formula interface.
(Wish of \PR{14541}.)
\item \code{iconv} has a new argument \code{toRaw} to handle (as
was possible before the \code{CHARSXP} cache was introduced)
encodings such as \code{UTF-16} with embedded nuls.
It will also accept as input the type of list generated with
\code{toRaw = TRUE}.
\item Garbage-collecting an unused input text connection no longer
gives a warning (since it \sQuote{connects} to nothing outside
\R).
\item \code{read.table()} and \code{scan()} have gained a
\code{text} argument, to allow reading data from a (possibly
literal) character string.
\item \code{optim(*, method = .)} now allows \code{method = "Brent"}
as an interface to \code{optimize()}, for use in cases such as
\code{mle()} where \code{optim()} is used internally.
\item \code{mosaicplot()} gains a \code{border} argument.
(Wish of \PR{14550}.)
\item \code{smooth.spline()} gains a \code{tol} argument which
controls how different \code{x} values need to be to regarded as
distinct. The default has been changed to be more reliable for
inputs whose range is small compared to their maximum absolute
value. (Wish of \PR{14452}.)
\item \code{gl()} runs faster by avoiding calling \code{factor()}.
\item The \code{print()} method for \code{object.size()} accepts
\samp{B} as well as \samp{b} as an abbreviation for \sQuote{bytes}.
\item \code{unlink()} gains a \code{force} argument to work like
\command{rm -f} and if possible override restrictive permissions.
\item \code{pbirthday()} and \code{qbirthday()} now use exact
calculations for \code{coincident = 2}.
\item \code{unzip()} and \code{unz()} connection have been updated
with support for more recent Zip64 features (including large file
sizes and \command{bzip2} compression, but not yet UTF-8 file
names).
\code{unzip()} has a new option to restore file times from those
recorded (in an unknown timezone) in the zip file.
\item \code{update.packages()} now accepts a character vector of
package names for the \code{oldPkgs} argument. (Suggestion of
Tal Galili.)
\item The special reference class fields \code{.self} and
\code{.refClassDef} are now read-only to prevent corrupting
the object.
\item \code{decompose()} now returns the original series as part
of its value, so it can be used (rather than reconstructed) when
plotting. (Suggestion of Rob Hyndman.)
\item Rao's efficient score test has been implemented for
\code{glm} objects. Specifically, the \code{add1}, \code{drop1},
and \code{anova} methods now allow \code{test = "Rao"}.
\item If a saved workspace (e.g. \file{.RData}) contains objects
that cannot be loaded, \R will now start with an warning message
and an empty workspace, rather than failing to start.
\item \code{strptime()} now accepts times such as \samp{24:00} for
midnight at the end of the day, for although these are disallowed by
POSIX 1003.1-2008, ISO 8601:2004 allows them.
\item Assignment of \code{names()} to S4 objects now checks for
a corresponding \code{"names"} slot, and generates a warning or
an error if that slot is not defined. See the section on slots
in \code{?Classes}.
\item The default methods for \code{is.finite()}, \code{is.infinite()}
and \code{is.nan()} now signal an error if their argument is not
an atomic vector.
\item The formula method for \code{plot()} no longer places
package \pkg{stats} on the search path (it loads the name space
instead).
\item \code{source()} tried hard to retain source formatting, and
might do so even if argument \code{keep.source} is false if the
\code{"keep.source"} option is true. Now \code{keep.source =
FALSE} temporarily sets \code{options(keep.source = FALSE)}.
\item There now is a genuine \code{"function"} method for
\code{plot()} rather than the generic dispatching internally to
\code{graphics::plot.function()}. It is now exported, so can be
called directly as \code{plot.function()}.
\item The one-sided \code{ks.test()} allows \code{exact = TRUE} to
be specified in the presence of ties (but the approximate
calculation remains the default: the \sQuote{exact} computation
makes assumptions known to be invalid in the presence of ties).
\item The behaviour of \code{curve(add = FALSE)} has changed: it
now no longer takes the defaults x limits from the previous plot
(if any): rather they default to \code{c(0, 1)} just as the
\code{"function"} method for \code{plot()}. To get the previous
behaviour use \code{curve(add = NA)}, which also takes the default for
log-scaling of the x-axis from the previous plot.
\item Both \code{curve()} and the \code{plot()} method for
functions have a new argument \code{xname} to facilitate plots
such as \code{sin(t)} \emph{vs} \code{t}.
\item The \code{local} argument to \code{source()} can specify an
environment as well as \code{TRUE} (\code{parent.env()}) and
\code{FALSE} (\code{.GlobalEnv}). It gives better error messages
for other values, such as \code{NA}.
\item \code{vcov()} gains methods for classes \code{"summary.lm"} and
\code{"summary.glm"}.
\item The \code{plot()} method for class \code{"profile.nls"}
gains \code{ylab} and \code{lty} arguments, and passes \code{...}
on to \code{plot.default}.
\item Character-string arguments such as the \code{mode} argument
of \code{vector()}, \code{as.vector()} and \code{is.vector()} and
the \code{description} argument of \code{file()} are required to
be of length one, rather than any further elements being silently
discarded. This helps catch incorrect usage in programming.
\item The \code{length} argument of \code{vector()} and its
wrappers such as \code{numeric()} is required to be of length 1
(instead of a warning as previously).
\item \code{vector(len)} and \code{length(x) <- len} no longer
acccept \code{TRUE}/\code{FALSE} for \code{len} (not that they
were ever documented to, but there was special-casing in the C
code).
\item There is a new function \code{Sys.setFileTime()} to set the
time of a file (including a directory).
\item The file times reported by \code{file.info()} are reported
to sub-second resolution on systems which support it. (Currently
the POSIX 2008 and FreeBSD/Darwin/NetBSD methods are detected.)
\item New function \code{getCall(m)} as an abstraction for
\code{m$call}, enabling \code{update(m)}'s default method to apply % $
more universally. (NB: this can be masked by existing functions
in packages.)
\item \code{Sys.info()} gains a \code{euser} component to report
the \sQuote{effective} user on OSes which have that concept.
\item The result returned by \code{try()} now contains the
original error condition object at the \code{"condition"}
attribute.
\item All packages are lazy-loaded irrespective of the
\samp{LazyLoad} field in the \file{DESCRIPTION} file.
(Experimental: documentation is not yet updated.)
\item Added new \samp{\figure} tag to Rd markup, so
that figures can be included in help pages when displayed
in HTML or LaTeX. There is an example in the help page for
\code{points()}.
\item The built-in httpd server now allows access to files
in the session temporary directory \code{tempdir()},
addressed as the \samp{/session} directory on the httpd
server.
\item Development versions of \R are no longer referred to by the
number under which they might be released, e.g. in the startup
banner, \command{R --version} and \code{sessionUtils()}. The
correct way to refer to a development version of R is
\sQuote{R-devel}, preferably with the date and SVN version number.\cr
E.g. \samp{R-devel (2011-07-04 r56266)}
\item There is a new function \code{texi2pdf()} in package
\pkg{tools}, currently a convenience wrapper for
\code{texi2dvi(pdf = TRUE)}.
\item There are two new options for typesetting PDF manuals from
Rd files. These are \samp{beramono} and \samp{inconsolata}, and
used the named font for mononspaced output. They are intended to
be used in combination with \samp{times}, and
\samp{times,inconsolata,hyper} is now the default for the
reference manual and package manuals.
\item Automatic printing for reference classes is now done by
the \code{$show()} method. A method is defined for class
\samp{envRefClass} and may be overriden for user classes (see
the \code{?ReferenceClasses} example). S4 \code{show()} methods
should no longer be needed for reference classes.
\item \code{tools::Rdiff} (by default) and \code{R CMD Rdiff}
now ignore differences in pointer values when comparing printed
environments, compiled byte code, etc.
\item The \code{"source"} attribute on functions created with
\code{keep.source=TRUE} has been replaced with a \code{"srcref"}
attribute. The \code{"srcref"} attribute references an in-memory
copy of the source file using the \code{"srcfilecopy"} or the
new \code{"srcfilealias"} class.
}
}
\subsection{GRAPHICS DEVICES}{
\itemize{
\item The \code{pdf()} device makes use of Flate compression: this
controlled by the new logical argument \code{compress}, and is
enabled by default.
\item Devices \code{svg()}, \code{cairo_pdf()} and
\code{cairo_ps()} gain a \code{family} argument.
On a Unix-alike \code{X11()} gains a \code{family} argument. This
is one of the \code{x11.options()} and so can be passed as an
argument to the \code{bmp()}, \code{jpeg()}, \code{png()} and
\code{tiff()} devices.
Analogous changes have been made on Windows, so all \R graphics
devices now have a \code{family} argument except \code{pictex()}
(which has no means to change fonts).
\item The \code{bmp()}, \code{jpeg()}, \code{png()} and \code{tiff()}
devices now make use of the \code{antialias} argument for
\code{type = "quartz"}.
\item There are several new built-in font mappings for
\code{X11(type = "Xlib")}: see the help on \code{X11Fonts()}.
\item There is a new type \code{X11(type = "dbcairo")} which
updates the screeen less frequently: see its help page.
\item The \code{X11()} device now makes use of cursors to
distinguish its states. The normal cursor is an arrow (rather
than a crosshair); the crosshair is used when the locator is in
use, and a watch cursor is shown when plotting computations are
being done. (These are the standard names for X11 cursors: how
they are actually displayed depends on the window manager.)
\item New functions \code{dev.hold()} and \code{dev.flush()} for
use with graphics devices with buffering. These are used for most
of the high-level graphics functions such as \code{boxplot()}, so
that the plot is only displayed when the page is complete.
Currently implemented for \code{windows(buffered = TRUE)},
\code{quartz()} and the cairo-based \code{X11()} types with
buffering (which are the default on-screen devices).
}
}
\subsection{SWEAVE & VIGNETTES}{
\itemize{
\item Options \code{keep.source = TRUE, figs.only = FALSE}
are now the default.
\item The way the type of user-defined options is determined has
changed. Previously they were all regarded as logical: now the
type is determined by the value given at first use.
\item The allowed values of logical options are now precisely
those allowed for character inputs to \code{as.logical()}: this
means that \samp{t} and \samp{f} are no longer allowed (although
\code{T} and \code{F} still are).
\item The preferred location for vignette sources is now the
directory \file{vignettes} and not \file{inst/doc}: \command{R CMD
build} will now re-build vignettes in directory \file{vignettes}
and copy the \file{.Rnw} (etc) files and the corresponding PDFs to
\file{inst/doc}. Further files to be copied to \file{inst/doc}
can be specified \emph{via} the file
\file{vignettes/.install_extras}.
\item \command{R CMD Sweave} now supports a \option{--driver}
option to select the Sweave driver: the default is equivalent to
\option{--driver=RweaveLatex}.
\item \command{R CMD Sweave} and \command{R CMD Stangle} support
options \option{--encoding} and \option{--options}.
\item The \code{Rtangle()} driver allows \code{output = "stdout"}
or \code{output = "stderr"} to select the output or message
connection. This is convenient for scripting using something like
\preformatted{ R CMD Stangle --options='output="stdout"' foo.Rnw > foo2.R}
\item There is a new option \code{pdf.compress} controlling
whether PDF figures are generated using Flate compression (they
are by default).
\item \command{R CMD Sweave} now has a \option{--pdf} option to
produce a PDF version of the processed Sweave document.
}
}
\subsection{C-LEVEL FACILITIES}{
\itemize{
\item Function \code{R_tmpnam2} has been added to the API to allow
a temporary filename to include a specified extension.
}
}
\subsection{PACKAGE INSTALLATION}{
\itemize{
\item Package \file{DESCRIPTION} file field \samp{KeepSource}
forces the package to be installed/loaded with \code{keep.source =
TRUE} (or \code{FALSE}). This applies at package installation
time for packages using lazy-loading. (Suggestion of Greg Snow.)
There are corresponding options \option{--with-keep.source} and
\option{--without-keep.source} for \command{R CMD INSTALL} for
packages using lazy-loading.
\item \command{R CMD INSTALL} has a new option
\option{--byte-compile} to byte-compile the packages during
installation (since all packages are now lazy-loaded). This can
be controlled on a per-package basis by the optional field
\samp{ByteCompile} in the \file{DESCRIPTION} file.
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD check} now gives an error if the \R code in a
vignette fails to run, unless this is caused by a missing package.
It now unpacks tarballs in the same way as \command{R CMD
INSTALL}, including making use of the environment variable
\env{R_INSTALL_TAR} to override the default behaviour.
\item The default for the environment variable
\env{_R_CHECK_COMPACT_DATA2_} is now true, so if using the newer
forms of compression introduced in \R 2.10.0 would be beneficial
is checked by default.
\item \command{R CMD Rd2dvi} allows the use of LaTeX package
\samp{inputenx} rather than \samp{inputenc}: the value of the
environment variable \env{RD2DVI_INPUTENC} is used. (LaTeX package
\samp{inputenx} is an optional install which provides greater
coverage of the UTF-8 encoding.)
\item \command{Rscript} on a Unix-alike now accepts file names
containing spaces (if these are escaped or quoted in the shell).
\item \command{R CMD build} on a Unix-alike (only) now tries to
preserve dates on files it copies from its input directory. (This
was the undocumented behaviour prior to \R 2.13.0.)
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item \code{require()} no longer has a \code{save} argument.
\item The \code{gamma} argument to \code{hsv()},
\code{rainbow()}, and \code{rgb2hsv()} has been removed.
\item The \option{--no-docs} option for
\command{R CMD build --binary} is defunct: use
\option{--install-args} instead.
\item The option \option{--unsafe} to \command{R CMD INSTALL} is
defunct: use the identical option \option{--no-lock} instead.
\item The entry point \code{pythag} formerly in \file{Rmath.h} is
defunct: use instead the C99 function \code{hypot}.
\item \command{R CMD build --binary} is formally defunct:
\command{R CMD INSTALL --build} has long been the preferred
alternative.
\item \command{zip.file.extract()} is now defunct: use
\code{unzip()} or \code{unz()} instead.
\item \command{R CMD Rd2dvi} without the \option{--pdf} option is
now deprecated: only PDF output will be supported in future
releases (since this allows the use of fonts only supported for
PDF).
\item A top-level \file{COPYING} file in a package is now
deprecated (file names \file{LICENSE} or \file{LICENCE} have long
been preferred), and will not be installed as from \R 2.15.0.
}
}
\subsection{INSTALLATION}{
\itemize{
\item The base and recommended packages are now byte-compiled
(equivalent to \command{make bytecode} in \R 2.13.x). On a
Unix-alike this can be disabled by configuring with
\option{--disable-byte-compiled-packages} (although this is intended
only for expert use and is not supported).
\item Configure option \option{--with-system-zlib} now only makes
use of the basic interface of \code{zlib} and not the
C function \samp{gzseek} which has shown erroneous behaviour in
\code{zlib} 1.2.4 and 1.2.5.
\item The \code{zlib} in the R sources is now version 1.2.5.
(This is safe even on 32-bit Linux systems because only the basic
interface is now used.)
\item The \file{.afm} files in package \pkg{grDevices} are now
installed as compressed files (as long done on Windows), saving ca
2MB on the installed size.
\item The non-screen cairo-based devices are no longer in the X11
module and so can be installed without X11. (We have never seen a
Unix-alike system with cairographics installed but not X11, but a
user might select \option{--without-x}.)
\item Configure will try to use \code{-fobjc-exceptions} for the
Objective-C compiler (if present) to ensure that even compilers
that do not enable exceptions by default (such as vanilla gcc) can
be used. (Objective-C is currently only used on Mac OS X.)
\item The system call \code{times} is required.
\item The C99 functions \code{acosh}, \code{asinh}, \code{atanh},
\code{snprintf} and \code{vsnprintf} are now required.
\item There is no longer support for making DVI manuals \emph{via}
\command{make dvi}, \command{make install-dvi} and similar. Only
PDF manuals are supported (to allow the use of fonts which are
only available for PDF.)
}
}
\subsection{BUG FIXES}{
\itemize{
\item The locale category \samp{LC_MONETARY} was only being set on
startup on Windows: that is now done on Unix-alikes where
supported.
\item Reference class utilities will detect an attempt to modify
methods or fields in a locked class definition (e.g., in a name
space) and generate an error.
\item The formula methods for \code{lines()}, \code{points()} and
\code{text()} now work even if package \pkg{stats} is not on the
search path.
\item In principle, S4 classes from different packages could
have the same name. This has never worked, but a first step has
been taken: Classes should now be found correctly from each
package's namespace or given the package slot. Methods for the
same generic function may still be selected incorrectly.
}
}
}
\section{CHANGES IN R VERSION 2.13.1 patched}{
\subsection{BUG FIXES}{
\itemize{
\item \code{fisher.test()} had a buglet: If arguments were
factors with unused levels, levels were dropped and you'd get an
error saying that there should be at least two levels,
inconsistently with pre-tabulated data. (Reported by Michael Fay).
\item \code{package.skeleton()} will no longer dump S4 objects
supplied directly, rather than in a code file. These cannot be
restored correctly from the dumped version.
\item Build-time expressions in help files did not have access
to functions in the package being built (with \command{R CMD build}).
\item Because \code{quote()} did not mark its result as being in
use, modification of the result could in some circumstances
modify the original call.
}
}
}
\section{\Rlogo CHANGES IN R VERSION 2.13.1}{
\subsection{NEW FEATURES}{
\itemize{
\item \code{iconv()} no longer translates \code{NA} strings as
\code{"NA"}.
\item \code{persp(box = TRUE)} now warns if the surface extends
outside the box (since occlusion for the box and axes is computed
assuming the box is a bounding box). (\PR{202}.)
\item \code{RShowDoc()} can now display the licences shipped with
\R, e.g. \code{RShowDoc("GPL-3")}.
\item New wrapper function \code{showNonASCIIfile()} in package
\pkg{tools}.
\item \code{nobs()} now has a \code{"mle"} method in package
\pkg{stats4}.
\item \code{trace()} now deals correctly with S4 reference classes
and corresponding reference methods (e.g., \code{$trace()})%$
have been added.
\item \command{xz} has been updated to 5.0.3 (very minor bugfix
release).
\item \code{tools::compactPDF()} gets more compression (usually a
little, sometimes a lot) by using the compressed object streams of
PDF 1.5.
\item \code{cairo_ps(onefile = TRUE)} generates encapsulated EPS
on platforms with cairo >= 1.6.
\item Binary reads (e.g. by \code{readChar()} and \code{readBin()})
are now supported on clipboard connections. (Wish of \PR{14593}.)
\item \code{as.POSIXlt.factor()} now passes \code{...} to the
character method (suggestion of Joshua Ulrich). [Intended for \R
2.13.0 but accidentally removed before release.]
\item \code{vector()} and its wrappers such as \code{integer()}
and \code{double()} now warn if called with a \code{length}
argument of more than one element. This helps track down user
errors such as calling \code{double(x)} instead of
\code{as.double(x)}.
}
}
\subsection{INSTALLATION}{
\itemize{
\item Building the vignette PDFs in packages \pkg{grid} and
\pkg{utils} is now part of running \command{make} from an SVN
checkout on a Unix-alike: a separate \command{make vignettes} step
is no longer required.
These vignettes are now made with \code{keep.source = TRUE} and
hence will be laid out differently.
\item \command{make install-strip} failed under some configuration
options.
\item Packages can customize non-standard installation of compiled
code via a \code{src/install.libs.R} script. This allows packages that
have architecture-specific binaries (beyond the package's shared
objects/DLLs) to be installed in a multi-architecture setting.
}
}
\subsection{SWEAVE & VIGNETTES}{
\itemize{
\item \code{Sweave()} and \code{Stangle()} gain an \code{encoding}
argument to specify the encoding of the vignette sources if the
latter do not contain a \samp{\\usepackage[]{inputenc}} statement
specifying a single input encoding.
\item There is a new Sweave option \code{figs.only = TRUE} to run
each figure chunk only for each selected graphics device, and not
first using the default graphics device. This will become the
default in \R 2.14.0.
\item Sweave custom graphics devices can have a custom function
\code{foo.off()} to shut them down.
\item Warnings are issued when non-portable filenames are found
for graphics files (and chunks if \code{split = TRUE}). Portable
names are regarded as alphanumeric plus hyphen, underscore, plus
and hash (periods cause problems with recognizing file
extensions).
\item The \code{Rtangle()} driver has a new option
\code{show.line.nos} which is by default false; if true it
annotates code chunks with a comment giving the line number of the
first line in the sources (the behaviour of \R >= 2.12.0).
\item Package installation tangles the vignette sources: this step
now converts the vignette sources from the vignette/package
encoding to the current encoding, and records the encoding (if not
ASCII) in a comment line at the top of the installed \file{.R}
file.
}
}
\subsection{LICENCE}{
\itemize{
\item No parts of \R are now licensed solely under GPL-2. The
licences for packages \pkg{rpart} and \pkg{survival} have been
changed, which means that the licence terms for \R as distributed
are GPL-2 | GPL-3.
}
}
\subsection{DEPRECATED AND DEFUNCT}{
\itemize{
\item The internal functions \code{.readRDS()} and
\code{.saveRDS()} are now deprecated in favour of the public
functions \code{readRDS()} and \code{saveRDS()} introduced in \R
2.13.0.
\item Switching off lazy-loading of code \emph{via} the
\samp{LazyLoad} field of the \file{DESCRIPTION} file is now
deprecated. In future all packages will be lazy-loaded.
\item The off-line \code{help()} types \samp{"postscript"} and
\samp{"ps"} are deprecated.
}
}
\subsection{UTILITIES}{
\itemize{
\item \command{R CMD check} on a multi-architecture installation now
skips the user's \file{.Renviron} file for the
architecture-specific tests (which do read the
architecture-specific \file{Renviron.site} files). This is
consistent with single-architecture checks, which use
\option{--no-environ}.
\item \command{R CMD build} now looks for \file{DESCRIPTION}
fields \samp{BuildResaveData} and \samp{BuildKeepEmpty} for
per-package overrides. See \sQuote{Writing R Extensions}.
}
}
\subsection{BUG FIXES}{
\itemize{
\item \code{plot.lm(which = 5)} was intended to order factor
levels in increasing order of mean standardized residual. It
ordered the factor labels correctly, but could plot the wrong
group of residuals against the label. (\PR{14545})
\item \code{mosaicplot()} could clip the factor labels, and could
overlap them with the cells if a non-default value of
\code{cex.axis} was used. (Related to \PR{14550}.)
\item \code{dataframe[[row,col]]} now dispatches on \code{[[}
methods for the selected column. (Spotted by Bill Dunlap).
\item \code{sort.int()} would strip the class of an object, but
leave its object bit set. (Reported by Bill Dunlap.)
\item \code{pbirthday()} and \code{qbirthday()} did not implement
the algorithm exactly as given in their reference and so were
unnecessarily inaccurate.
\code{pbirthday()} now solves the approximate formula analytically
rather than using \code{uniroot()} on a discontinuous function.
The description of the problem was inaccurate: the probability is
a tail probablity (\sQuote{2 \emph{or more} people share a birthday})
\item Complex arithmetic sometimes warned incorrectly about
producing NAs when there were NaNs in the input.
\item \code{seek(origin = "current")} incorrectly reported it was
not implemented for a \code{gzfile()} connection.
\item \code{c()}, \code{unlist()}, \code{cbind()} and
\code{rbind()} could silently overflow the maximum vector length
and cause a segfault. (\PR{14571})
\item The \code{fonts} argument to \code{X11(type = "Xlib")} was
being ignored.
\item Reading (e.g. with \code{readBin()}) from a raw connection
was not advancing the pointer, so successive reads would read the
same value. (Spotted by Bill Dunlap.)
\item Parsed text containing embedded newlines was printed
incorrectly by \code{as.character.srcref()}. (Reported by Hadley
Wickham.)
\item \code{decompose()} used with a series of a non-integer
number of periods returned a seasonal component shorter than the
original series. (Reported by Rob Hyndman.)
\item \code{fields = list()} failed for \code{setRefClass()}.
(Reported by Michael Lawrence.)
\item Reference classes could not redefine an inherited field
which had class \code{"ANY"}. (Reported by Janko Thyson.)
\item Methods that override previously loaded versions will now
be installed and called. (Reported by Iago Mosqueira.)
\item \code{addmargins()} called \code{numeric(apos)} rather than
\code{numeric(length(apos))}.
\item The HTML help search sometimes produced bad links.
(\PR{14608})
\item Command completion will no longer be broken if
\code{tail.default()} is redefined by the user. (Problem reported
by Henrik Bengtsson.)
\item LaTeX rendering of markup in titles of help pages has been
improved; in particular, \code{\\eqn{}} may be used there.
\item \code{isClass()} used its own namespace as the default of
the \code{where} argument inadvertently.
\item Rd conversion to latex mis-handled multi-line titles
(including cases where there was a blank line in the \samp{\title}
section). (It seems this happened only in 2.13.0 patched.)
}
}
}
\section{\Rlogo CHANGES IN R VERSION 2.13.0}{
\subsection{SIGNIFICANT USER-VISIBLE CHANGES}{
\itemize{
\item \code{replicate()} (by default) and \code{vapply()} (always)
now return a higher-dimensional array instead of a matrix in the case
where the inner function value is an array of dimension >= 2.
\item Printing and formatting of floating point numbers is now
using the correct number of digits, where it previously rarely
differed by a few digits. (See \dQuote{scientific} entry below.)
This affects \emph{many} \file{*.Rout.save} checks in packages.
}
}
\subsection{NEW FEATURES}{
\itemize{
\item \code{normalizePath()} has been moved to the \pkg{base}
package (from \pkg{utils}): this is so it can be used by
\code{library()} and friends.
It now does tilde expansion.
It gains new arguments \code{winslash} (to select the separator on
Windows) and \code{mustWork} to control the action if a canonical
path cannot be found.
\item The previously barely documented limit of 256 bytes on a
symbol name has been raised to 10,000 bytes (a sanity check).
Long symbol names can sometimes occur when deparsing expressions
(for example, in \code{model.frame}).
\item \code{reformulate()} gains a \code{intercept} argument.
\item \code{cmdscale(add = FALSE)} now uses the more common
definition that there is a representation in \code{n-1} or less
dimensions, and only dimensions corresponding to positive
eigenvalues are used. (Avoids confusion such as \PR{14397}.)
\item Names used by \code{c()}, \code{unlist()}, \code{cbind()}
and \code{rbind()} are marked with an encoding when this can be
ascertained.
\item R colours are now defined to refer to the sRGB color space.
The PDF, PostScript, and Quartz graphics devices record this fact.
X11 (and cairo) and Windows just assume that your screen conforms.
\item \code{system.file()} gains a \code{mustWork} argument
(suggestion of Bill Dunlap).
\item \code{new.env(hash = TRUE)} is now the default.
\item \code{list2env(envir = NULL)} defaults to hashing (with a
suitably sized environment) for lists of more than 100 elements.
\item \code{text()} gains a formula method.
\item \code{IQR()} now has a \code{type} argument which is passed
to \code{quantile()}.
\item \code{as.vector()}, \code{as.double()} etc duplicate less
when they leave the mode unchanged but remove attributes.
\code{as.vector(mode = "any")} no longer duplicates when it does
not remove attributes. This helps memory usage in \code{matrix()}
and \code{array()}.
\code{matrix()} duplicates less if \code{data} is an atomic vector
with attributes such as names (but no class).
\code{dim(x) <- NULL} duplicates less if \code{x} has neither
dimensions nor names (since this operation removes names and
dimnames).
\item \code{setRepositories()} gains an \code{addURLs} argument.
\item \code{chisq.test()} now also returns a \code{stdres}
component, for standardized residuals (which have unit variance,
unlike the Pearson residuals).
\item \code{write.table()} and friends gain a \code{fileEncoding}
argument, to simplify writing files for use on other OSes (e.g. a
spreadsheet intended for Windows or Mac OS X Excel).
\item Assignment expressions of the form \code{foo::bar(x) <- y}
and \code{foo:::bar(x) <- y} now work; the replacement functions
used are \code{foo::`bar<-`} and \code{foo:::`bar<-`}.
\item \code{Sys.getenv()} gains a \code{names} argument so
\code{Sys.getenv(x, names = FALSE)} can replace the common idiom
of \code{as.vector(Sys.getenv())}. The default has been changed
to not name a length-one result.
\item Lazy loading of environments now preserves attributes and
locked status. (The locked status of bindings and active bindings
are still not preserved; this may be addressed in the future).
\item \code{options("install.lock")} may be set to \code{FALSE}
so that \code{install.packages()} defaults to \option{--no-lock}
installs, or (on Windows) to \code{TRUE} so that binary installs
implement locking.
\item \code{sort(partial = p)} for large \code{p} now tries
Shellsort if quicksort is not appropriate and so works for
non-numeric atomic vectors.
\item \code{sapply()} gets a new option \code{simplify = "array"}
which returns a \dQuote{higher rank} array instead of just a matrix
when \code{FUN()} returns a \code{dim()} length of two or more.
\code{replicate()} has this option set by default, and
\code{vapply()} now behaves that way internally.
\item \code{aperm()} becomes S3 generic and gets a \code{table}
method which preserves the class.
\item \code{merge()} and \code{as.hclust()} methods for objects of
class \code{"dendrogram"} are now provided.
\item The character method of \code{as.POSIXlt()} now tries to
find a format that works for all non-\code{NA} inputs, not just
the first one.
\item \code{str()} now has a method for class \code{"Date"}
analogous to that for class \code{"POSIXt"}.
\item New function \code{file.link()} to create hard links on
those file systems (POSIX, NTFS but not FAT) that support them.
\item New \code{Summary()} group method for class \code{"ordered"}
implements \code{min()}, \code{max()} and \code{range()} for
ordered factors.
\item \code{mostattributes<-()} now consults the \code{"dim"}
attribute and not the \code{dim()} function, making it more useful
for objects (such as data frames) from classes with methods for
\code{dim()}. It also uses \code{attr<-()} in preference to the
generics \code{name<-()}, \code{dim<-()} and \code{dimnames<-()}.
(Related to \PR{14469}.)
\item There is a new option \code{"browserNLdisabled"} to disable
the use of an empty (e.g. via the \sQuote{Return} key) as a synonym
for \code{c} in \code{browser()} or \code{n} under \code{debug()}.
(Wish of \PR{14472}.)
\item \code{example()} gains optional new arguments
\code{character.only} and \code{give.lines} enabling programmatic
exploration.
\item \code{serialize()} and \code{unserialize()} are no longer
described as \sQuote{experimental}. The interface is now regarded
as stable, although the serialization format may well change in
future releases. (\code{serialize()} has a new argument
\code{version} which would allow the current format to be written
if that happens.)
New functions \code{saveRDS()} and \code{readRDS()} are public
versions of the \sQuote{internal} functions \code{.saveRDS()} and
\code{.readRDS()} made available for general use. The dot-name
versions remain available as several package authors have made use
of them, despite the documentation. \code{readRDS()} no longer
wraps non-file connections in a call to \code{gzcon()}, for
efficiency (see its documentation).
\code{saveRDS()} supports \code{compress = "xz"}.
\item Many functions when called with a not-open connection will
now ensure that the connection is left not-open in the event of
error. These include \code{read.dcf()}, \code{dput()},
\code{dump()}, \code{load()}, \code{parse()}, \code{readBin()},
\code{readChar()}, \code{readLines()}, \code{save()},
\code{writeBin()}, \code{writeChar()}, \code{writeLines()},
\code{.readRDS()}, \code{.saveRDS()} and \code{tools::parse_Rd()},
as well as functions calling these.
\item Public functions \code{find.package()} and \code{path.package()}
replace the internal dot-name versions.
\item The default method for \code{terms()} now looks for a
\code{"terms"} attribute if it does not find a \code{"terms"}
component, and so works for model frames.
\item \code{httpd()} handlers receive an additional argument
containing the full request headers as a raw vector (this can be
used to parse cookies, multi-part forms etc.). The recommended
full signature for handlers is therefore \code{function(url,
query, body, headers, ...)}.
\item \code{file.edit()} gains a \code{fileEncoding} argument to
specify the encoding of the file(s).
\item The format of the HTML package listings has changed. If
there is more than one library tree , a table of links to
libraries is provided at the top and bottom of the page. Where a
library contains more than 100 packages, an alphabetic index is
given at the top of the section for that library. (As a
consequence, package names are now sorted case-insensitively
whatever the locale.)
\item \code{isSeekable()} now returns \code{FALSE} on connections
which have non-default \code{encoding}. Although documented to
record if \sQuote{in principle} the connection supports seeking,
it seems safer to report \code{FALSE} when it may not work.
\item \command{R CMD REMOVE} and \code{remove.packages()} now
remove file \code{R.css} when removing all remaining packages in a
library tree. (Related to the wish of \PR{14475}: note that this
file is no longer installed.)
\item \code{unzip()} now has a \code{unzip} argument like
\code{zip.file.extract()}. This allows an external
\command{unzip} program to be used, which can be useful to access
features supported by Info-ZIP's \command{unzip} version 6 which
is now becoming more widely available.
\item There is a simple \code{zip()} function, as wrapper for an
external \command{zip} command.
\item \code{bzfile()} connections can now read from concatenated
\command{bzip2} files (including files written with
\code{bzfile(open = "a")}) and files created by some other
compressors (such as the example of \PR{14479}).
\item The primitive function \code{c()} is now of type BUILTIN.
\item \code{plot(<dendrogram>, .., nodePar=*)} now obeys an optional
\code{xpd} specification (allowing clipping to be turned off
completely).
\item \code{nls(algorithm="port")} now shares more code with
\code{nlminb()}, and is more consistent with the other
\code{nls()} algorithms in its return value.
\item \command{xz} has been updated to 5.0.1 (very minor bugfix
release).
\item \code{image()} has gained a logical \code{useRaster}
argument allowing it to use a bitmap raster for plotting a
regular grid instead of polygons. This can be more efficient, but
may not be supported by all devices. The default is \code{FALSE}.
\item \code{list.files()}/\code{dir()} gains a new argument
\code{include.dirs()} to include directories in the listing when
\code{recursive = TRUE}.
\item New function \code{list.dirs()} lists all directories,
(even empty ones).
\item \code{file.copy()} now (by default) copies
read/write/execute permissions on files, moderated by the current