1% -*- coding: utf-8 -*- 2\newcommand{\Rlogo}{\if{html}{\figure{../../html/Rlogo.svg}{options: class="toplogo" alt="[R logo]"}}\if{latex}{\figure{Rlogo.pdf}{options: width=0.5in}}} 3 4\name{NEWS} 5\title{R News} 6\encoding{UTF-8} 7 8\section{LATER NEWS}{ 9 \itemize{ 10 \item News for \R 4.x.y can be found in HTML format at 11 \ifelse{html}{\url{NEWS.html}}{\file{doc/html/NEWS.html}}, 12 and in text format in file 13 \ifelse{html}{\href{../NEWS}{NEWS}}{\file{NEWS}} 14 in the \file{doc} directory. 15 } 16} 17 18\section{\Rlogo CHANGES IN R 3.6.3}{ 19 20 \subsection{NEW FEATURES}{ 21 \itemize{ 22 \item The included LAPACK has been updated to version 3.9.0 (for 23 the included routines, just bug fixes). 24 } 25 } 26 27 \subsection{BUG FIXES}{ 28 \itemize{ 29 \item Fixed a C level integer overflow in \code{rhyper()}; reported 30 by Benjamin Tyner in \PR{17694}. 31 32 \item Uses of \code{url(gzcon(.))} needing to extend buffer size 33 have failed (with HTTP/2 servers), reported by Gábor Csárdi. 34 35 \item \code{predict(loess(..), se=TRUE)} now errors out (instead of 36 seg.faulting etc) for large sample sizes, thanks to a report and 37 patch by Benjamin Tyner in \PR{17121}. 38 39 \item \code{tools:assertCondition(., "error")} and hence 40 \code{assertError()} no longer return errors twice (invisibly). 41 42 \item \code{update(form, new)} in the case of a long \code{new} 43 formula sometimes wrongly eliminated the intercept from \code{form}, 44 or (more rarely) added a garbage term (or seg.faulted !); the fix 45 happened by simplifying the C-level logic of \code{terms.formula()}. 46 Reported by Mathias Ambühl in \PR{16326}. 47 48 \item The error message from \code{stopifnot(.., <error producing call>)} 49 again contains the full \code{"stopifnot(.......)"} call: Its 50 attempted suppression did not work consistently. % & was an ugly hack 51 52 \item On Windows, \code{download.file(., , "wininet", headers=character())} 53 would fail; reported with patch proposal by Kevin Ushey in \PR{17710}. 54 } 55 } 56} 57 58\section{\Rlogo CHANGES IN R 3.6.2}{ 59 60 \subsection{NEW FEATURES}{ 61 \itemize{ 62 \item \code{runmed(x, *)} gains a new option \code{na.action} 63 determining \emph{how} to handle \code{NaN} or \code{NA} in \code{x}. 64 65 \item \code{dotchart()} gains new options \code{ann}, \code{xaxt}, 66 \code{frame.plot} and \code{log}. 67 } 68 } 69 70 \subsection{INSTALLATION on a UNIX-ALIKE}{ 71 \itemize{ 72 \item Detection of the C stack direction has been moved from 73 run-time to \command{configure}: this is safer with LTO builds and 74 allows the detection to be overridden -- see file 75 \file{config.site}. 76 77 \item Source-code changes enable installation on platforms using 78 \command{gcc -fno-common} (the expected default for 79 \command{gcc 10.x}). 80 } 81 } 82 83 \subsection{C-LEVEL FACILITIES}{ 84 \itemize{ 85 \item \code{installTrChar} (which is nowadays is wrapped by 86 \code{installChar}) is defined in \file{Rinternals.h}. (Neither 87 are part of the API.) 88 } 89 } 90 91 \subsection{PACKAGE INSTALLATION}{ 92 \itemize{ 93 \item Header \file{Rconfig.h} contains the value of 94 \code{FC_LEN_T} deduced at installation which is used by the 95 prototypes in headers \file{R_ext/BLAS.h} and 96 \file{R_ext/Lapack.h} but to avoid extensive breakage this is 97 only exposed when \code{USE_FC_LEN_T} is defined. 98 99 If a package's C/C++ calls to BLAS/LAPACK allow for the 100 \sQuote{hidden} arguments used by most Fortran compilers to pass 101 the lengths of Fortran character arguments, define 102 \code{USE_FC_LEN_T} and include \file{Rconfig.h} (possibly 103 \emph{via} \file{R.h}) before including \file{R_ext/BLAS.h} or 104 \file{R_ext/Lapack.h}. 105 106 \item A package with Fortran source code and perhaps C (but not 107 C++) sources can request for its shared object/DLL to be linked by 108 the Fortran compiler by including a line \code{USE_FC_TO_LINK=} in 109 \file{src/Makevars[.win]} and using \code{$(SHLIB_OPENMP_FFLAGS)} 110 as part of \code{PKG_LIBS}. 111 112 The known reason for doing so is a package which uses Fortran 113 (only) OpenMP on a platform where the Fortran OpenMP runtime is 114 incompatible with the C one (e.g.\sspace{}\command{gfortran} 9.x 115 with \command{clang}). 116 } 117 } 118 119 \subsection{UTILITIES}{ 120 \itemize{ 121 \item \command{R CMD check} has a new option to mitigate checks 122 leaving files/directories in \file{/tmp}. See the \sQuote{R 123 Internals} manual -- this is part of \code{--as-cran}. 124 } 125 } 126 127 \subsection{Windows}{ 128 \itemize{ 129 \item The default standard for C++ in package installation is 130 C++11 (as it has been on other platforms where available since \R{} 131 3.6.0: the default toolchain on Windows was defaulting to C++98). 132 } 133 } 134 135 \subsection{DEPRECATED AND DEFUNCT}{ 136 \itemize{ 137 \item Support for specifying C++98 in package installation is 138 deprecated. 139 140 \item Support in \command{R CMD config} for \samp{F77}, 141 \samp{FCPIFCPLAGS}, \samp{CPP}, \samp{CXXCPP} and \samp{CXX98} and 142 similar is deprecated. (\samp{CPP} is found from the system 143 \command{make} and may well not be set.) 144 145 Use \samp{$CC -E} and \samp{$CXX -E} instead of \samp{CPP} and 146 \samp{CXXCPP}. 147 } 148 } 149 150 \subsection{BUG FIXES}{ 151 \itemize{ 152 \item \code{runmed(x, *)} when \code{x} contains missing values 153 now works consistently for both \code{algorithm="Stuetzle"} and 154 \code{"Turlach"}, and no longer segfaults for \code{"Turlach"}, as 155 reported by Hilmar Berger. 156 157 \item \code{apply(diag(3), 2:3, mean)} now gives a helpful error message. 158 159 \item \code{dgamma(x, shape, log=TRUE)} now longer overflows 160 to \code{Inf} for shape < 1 and very small \code{x}, fixing 161 \PR{17577}, reported by Jonathan Rougier. 162 163 \item Buffer overflow in building error messages fixed. Reported 164 by Benjamin Tremblay. 165 166 \item \code{options(str = .)} is correctly initialized at 167 package \pkg{utils} load time, now. A consequence is that 168 \code{str()} in scripts now is more consistent to interactive use, 169 e.g., when displaying function(**) argument lists. 170 171 \item \code{as.numeric(<call>)} now gives correct error message. 172 173 \item Printing \code{ls.str()} no longer wrongly shows 174 \code{"<missing>"} in rare cases. 175 176 \item Auto-printing S4 objects no longer duplicates the object, 177 for faster speed and reduced memory consumption. Reported by Aaron 178 Lun. 179 180 \item \code{pchisq(<LRG>, <LRG>, ncp=100)} no longer takes 181 practically forever in some cases. Hence ditto for corresponding 182 \code{qchisq()} calls. 183 184 \item \code{x \%\% L} for finite \code{x} no longer returns 185 \code{NaN} when \code{L} is infinite, nor suffers from cancellation 186 for large finite \code{L}, thanks to Long Qu's \PR{17611}. 187 188 Analogously, \code{x \%/\% L} and \code{L \%/\% x} suffer less from 189 cancellation and return values corresponding to limits for large 190 \code{L}. 191 192 \item \code{grepl(NA, *)} now returns \code{logical} as documented. 193 194 \item \code{options(warn=1e11)} is an error now, instead of later 195 leading to C stack overflow because of infinite recursion. 196 197 \item \code{R_tryCatch} no longer transfers control for all 198 conditions. Reported and patch provided by Lionel Henry in 199 \PR{17617}. 200 201 \item \code{format(object.size(.), digits=NULL)} now works, fixing 202 \PR{17628} reported by Jonathan Carroll. 203 204 \item \code{get_all_vars(f, d)} now also works for cases, e.g. where 205 \code{d} contains a matrix. Reported by Simon Wood in 2009 and patch 206 provided by Ben Bolker in \PR{13624}. 207 208 Additionally, it now also works when some variables are data frames, 209 fixing \PR{14905}, reported by Patrick Breheny. 210 211 \item \code{barplot()} could get spacings wrong if there were exactly two 212 bars \PR{15522}. Patch by Michael Chirico. 213 214 \item \code{power.t.test()} works in more cases when returning values 215 of n smaller than 2. 216 217 \item \code{dotchart(*, pch=., groups=.)} now works better. Reported 218 by Robert and confirmed by Nic Rochette in \PR{16953}. 219 220 \item \code{canCoerce(obj, cl)} no longer assumes 221 \code{length(class(obj)) == 1}. 222 223 \item \code{plot.formula(*, subset = *)} now also works in a boundary 224 case reported by Robert Schlicht (TU Dresden). 225 226 \item \code{readBin()} and \code{writeBin()} of a 227 \code{rawConnection()} now also work in large cases, thanks to a 228 report and proposal by Taeke Harkema in \PR{17665}. 229 } 230 } 231} 232 233\section{\Rlogo CHANGES IN R 3.6.1}{ 234 235 \subsection{INSTALLATION on a UNIX-ALIKE}{ 236 \itemize{ 237 \item The default detection of the shell variable \code{libNN} is 238 overridden for derivatives of Debian Linux, some of which have 239 started to have a \file{/usr/lib64} directory. 240 (E.g.\sspace{}Ubuntu 19.04.) As before, it can be specified in 241 \file{config.site}. 242 } 243 } 244 245 \subsection{UTILITIES}{ 246 \itemize{ 247 \item \command{R CMD config} knows the values of \code{AR} and 248 \code{RANLIB}, often set for LTO builds. 249 } 250 } 251 252 \subsection{DEPRECATED AND DEFUNCT}{ 253 \itemize{ 254 \item The use of a character vector with \code{.Fortran()} is 255 formally deprecated and gives a non-portability warning. (It has 256 long been strongly discouraged in \sQuote{Writing R Extensions}.) 257 } 258 } 259 260 \subsection{BUG FIXES}{ 261 \itemize{ 262 \item On Windows, GUI package installation via \code{menuInstallPkgs()} 263 works again, thanks to Len Weil's and Duncan Murdoch's \PR{17556}. 264 265 \item \command{R CMD check} on \code{data()} fixing \PR{17558} 266 thanks to Duncan Murdoch. 267 268 \item \code{quasi(*, variance = list(..))} now works more 269 efficiently, and should work in all cases fixing \PR{17560}. 270 Further, \code{quasi(var = mu(1-mu))} and \code{quasi(var = "mu ^ 3")} 271 now work, and \code{quasi(variance = "log(mu)")} now gives a correct 272 error message. 273 274 \item Creation of lazy loading database during package installation is 275 again robust to Rprofile changing the current working directory 276 (\PR{17559}). 277 278 \item \code{boxplot(y ~ f, horizontal=TRUE)} now produces correct x- 279 and y-labels. 280 281 \item \code{rbind.data.frame()} allows to keep \code{<NA>} levels 282 from factor columns (\PR{17562}) via new option \code{factor.exclude}. 283 284 Additionally, it works in one more case with matrix-columns which 285 had been reported on 2017-01-16 by Krzysztof Banas. 286 287 \item Correct messaging in C++ pragma checks in \pkg{tools} code for 288 \command{R CMD check}, fixing \PR{17566} thanks to Xavier Robin. 289 290 \item{print()}ing and auto-printing no longer differs for 291 \code{function}s with a user defined \code{print.function}, thanks to 292 Bill Dunlap's report. 293 294 \item On Windows, \code{writeClipboard(.., format = <n>)} now 295 does correctly pass \code{format} to the underlying C code, thanks to 296 a bug report (with patch) by Jenny Bryan. 297 298 \item \code{as.data.frame()} treats 1D arrays the same as vectors, 299 \PR{17570}. 300 301 \item Improvements in \code{smoothEnds(x, *)} working with 302 \code{NA}s (towards \code{runmed()} working in that case, in the next 303 version of R). 304 305 \item \code{vcov(glm(<quasi>), dispersion = *)} works correctly 306 again, fixing \PR{17571} thanks to Pavel Krivitsky. 307 308 \item \command{R CMD INSTALL} of binary packages on Windows now 309 works also with per-directory locking. 310 311 \item \command{R CMD INSTALL} and \code{install.packages()} on Windows 312 are now more robust against a locked file in an earlier installation 313 of the package to be installed. The default value of option 314 \code{install.lock} on Windows has been changed to \code{TRUE}. 315 316 \item On Unix alikes (when \command{readline} is active), only 317 expand tilde (\code{~}) file names starting with a tilde, instead of 318 almost all tildes. 319 320 \item In R documentation (\file{*.Rd}) files, \samp{\item [..]} is no 321 longer treated specially when rendered in LaTeX and hence pdf, but 322 rather shows the brackets in all cases. 323 } 324 } 325} 326 327\section{\Rlogo CHANGES IN R 3.6.0}{ 328 329 \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{ 330 \itemize{ 331 \item Serialization format version 3 becomes the default for 332 serialization and saving of the workspace (\code{save()}, 333 \code{serialize()}, \code{saveRDS()}, \code{compiler::cmpfile()}). 334 Serialized data in format 3 cannot be read by versions of \R prior 335 to version 3.5.0. Serialization format version 2 is still 336 supported and can be selected by \code{version = 2} in the 337 save/serialization functions. The default can be changed back for 338 the whole \R session by setting environment variables 339 \env{R_DEFAULT_SAVE_VERSION} and \env{R_DEFAULT_SERIALIZE_VERSION} 340 to \code{2}. For maximal back-compatibility, files 341 \file{vignette.rds} and \file{partial.rdb} generated by \command{R 342 CMD build} are in serialization format version 2, and resave by 343 default produces files in serialization format version 2 (unless 344 the original is already in format version 3). 345 346 \item The default method for generating from a discrete uniform 347 distribution (used in \code{sample()}, for instance) has been 348 changed. This addresses the fact, pointed out by Ottoboni and 349 Stark, that the previous method made \code{sample()} noticeably 350 non-uniform on large populations. See \PR{17494} for a 351 discussion. The previous method can be requested using 352 \code{RNGkind()} or \code{RNGversion()} if necessary for 353 reproduction of old results. Thanks to Duncan Murdoch for 354 contributing the patch and Gabe Becker for further assistance. 355 356 The output of \code{RNGkind()} has been changed to also return the 357 \sQuote{kind} used by \code{sample()}. 358 } 359 } 360 361 \subsection{NEW FEATURES}{ 362 \itemize{ 363 \item \code{Sys.setFileTime()} has been vectorized so arguments 364 \code{path} and \code{time} of length greater than one are now 365 supported. 366 367 \item \code{axis()} gets new option \code{gap.axis = NA} for 368 specifying a multiplication factor for the minimal \dQuote{gap} 369 (distance) between axis labels drawn. Its default is \code{1} 370 for labels \emph{parallel} to the axis, and \code{0.25} for 371 perpendicular ones. 372 373 Perpendicular labels no longer overlap, fixing bug \PR{17384}. 374 375 \item The default method of \code{plot()} gains new arguments 376 \code{xgap.axis = NA} and \code{ygap.axis = NA} to be passed to 377 the x-- and y-- \code{axis(.., gap.axis=*)} calls. 378 379 \item \code{removeSource()} now works not only for functions but 380 also for some language objects. 381 382 \item \code{as.call()}, \code{rep.int()}, \code{rep_len()} and 383 \code{nchar()} dispatch internally. 384 385 \item \code{is(object, class2)} looks for \code{class2} in the 386 calling namespace after looking in the namespace of 387 \code{class(object)}. 388 389 \item \code{extendrange(.., f)} with a length-2 \code{f} now 390 extends separately to the left and the right. 391 392 \item \code{lengths()} dispatches internally to S4 methods. 393 394 \item \code{download.file()} on Windows now uses \code{URLdecode()} 395 to determine the file extension, and uses binary transfer 396 (\code{mode = "wb"}) also for file extension \file{.rds}. 397 398 The help page for \code{download.file()} now contains the same 399 information on all platforms. 400 401 \item Setting \samp{C} locale for collation \emph{via} environment 402 variables \env{LC_ALL} and \env{LC_COLLATE} and \emph{via} a call 403 to \code{Sys.setlocale()} now takes precedence over environment 404 variable \env{R_ICU_LOCALE}. 405 406 \item There is a new function, \code{nullfile()}, to give the file 407 name of the null system device (e.g., \file{/dev/null}) on the 408 current platform. % not the null graphics device. 409 410 \item There are two new options, \code{keep.parse.data} and 411 \code{keep.parse.data.pkgs}, which control whether parse data are 412 included into sources when \code{keep.source} or 413 \code{keep.source.pkgs} is \code{TRUE}. By default, 414 \code{keep.parse.data.pkgs} is now \code{FALSE}, which changes 415 previous behavior and significantly reduces space and time overhead 416 when sources are kept when installing packages. 417 418 \item In \code{rapply(x, ..)}, \code{x} can also be 419 \dQuote{list-like} and of length \eqn{\ge 2^{31}}{>= 2^{31}}. 420 421 \item \code{trimws()} gets new optional \code{whitespace} 422 argument, allowing more extensive definitions of \dQuote{space}, 423 such as including Unicode spaces (as wished in \PR{17431}). 424 425 \item \code{weighted.mean()} no longer coerces the weights to a 426 double/numeric vector, since \code{sum()} now handles integer 427 overflow. This makes \code{weighted.mean()} more polymorphic and 428 endomorphic, but be aware that the results are no longer 429 guaranteed to be a vector of type \samp{double}. 430 431 \item When loading namespaces, S3 method registrations which 432 overwrite previous registrations are now noted by default (using 433 \code{packageStartupMessage()}). 434 435 \item \code{compiler::cmpfile()} gains a \code{version} argument, for 436 use when the output file should be saved in serialization format 2. 437 438 \item The axis labeling in the default method of \code{pairs()} 439 may now be toggled by new options \code{horOdd} and \code{verOdd}. 440 441 \item (Not Windows nor macOS.) Package \pkg{tcltk} now supports an 442 environment variable \env{R_DONT_USE_TK} which if set disables Tk 443 initialization. This is intended for use to circumvent errors in 444 loading the package, e.g.\sspace{}with recent Linux running under 445 an address sanitizer. 446 447 \item The \code{numeric} method of \code{all.equal()} gets 448 optional arguments \code{countEQ} and \code{formatFUN}. If 449 \code{countEQ} is true, the mean error is more sensible when many 450 entries are \bold{eq}ual. 451 452 \item \code{outer(x,y, FUN = "*")} is more efficient using 453 \code{tcrossprod(u,v)} instead of \code{u \%*\% t(v)}. 454 455 \item \code{vcov(<mlm>)} is more efficient via new optional 456 arguments in \code{summary.mlm()}. 457 458 \item The default method of \code{summary()} gets an option to 459 choose the \emph{kind} of \code{quantile()}s to use; wish of 460 \PR{17438}. 461 462 \item Fitting multiple linear models \emph{via} \code{lm()} does 463 work with \emph{matrix} offsets, as suggested in \PR{17407}. 464 465 \item The new functions \code{mem.maxVSize()} and 466 \code{mem.maxMSize()} allow the maximal size of the vector heap 467 and the maximal number of nodes allowed in the current \command{R} 468 process to be queried and set. 469 470 \item \code{news()} gains support for \file{NEWS.md} files. 471 472 \item An effort has been started to have our reference manuals, 473 i.e., all help pages. show platform-independent information (rather 474 than Windows or Unix-alike specifics visible only on that platform). 475 Consequently, the Windows version of \code{X11()} / \code{x11()} 476 got identical formal arguments to the Unix one. 477 478 \item \code{sessionInfo()$running} has been factored out in a new 479 variable \code{osVersion}. % precomputed at utils namespace load time 480 481 \item \code{slice.index()} now also works for multi-dimensional 482 margins. 483 484 \item \code{untar()} used with an external \command{tar} command 485 assumes this supports decompression including \command{xz} and 486 automagically detecting the compression type. This has been true 487 of all mainstream implementations since 2009 (for GNU 488 \command{tar}, since version 1.22): older implementations are 489 still supported \emph{via} the new argument 490 \code{support_old_tars} whose default is controlled by environment 491 variable \env{R_SUPPORT_OLD_TARS}. (It looks like NetBSD and 492 OpenBSD have \sQuote{older} \command{tar} commands for this 493 purpose.) 494 495 \item The new function \code{asplit()} allow splitting an array or 496 matrix by its margins. 497 498 \item New functions \code{errorCondition()} and 499 \code{warningCondition()} provide a convenient way to create 500 structured error and warning objects. 501 502 \code{.Deprecated()} now signals a warning of class 503 \code{"deprecatedWarning"}, and \code{.Defunct()} now signals an 504 error of class \code{"defunctError"}. 505 506 \item Many \sQuote{package not found} errors are now signaled as 507 errors of class \code{"packageNotFoundError"}. 508 509 \item As an experimental feature, when \code{loadNamespace()} fails 510 because the requested package is not available the error is 511 initially signaled with a \code{retry_loadNamespace} restart 512 available. This allows a calling handler to try to install the 513 package and continue. 514 515 \item \code{S3method()} directives in \file{NAMESPACE} can now 516 also be used to perform \emph{delayed} S3 method registration. 517 518 \item Experimentally, setting environment variable 519 \env{_R_CHECK_LENGTH_1_LOGIC2_} will lead to warnings (or errors 520 if the variable is set to a \sQuote{true} value) when \code{&&} or 521 \code{||} encounter and use arguments of length more than one. 522 523 \item Added \code{"lines"} and \code{"chars"} coordinate systems 524 to \code{grconvertX()} and \code{grconvertY()}. 525 526 \item \code{getOption()} is more efficient notably for the rare 527 case when called with two arguments, from several contributors in 528 \PR{17394}. 529 530 \item In \code{.col(dim)} and \code{.row(dim)}, \code{dim} now may 531 also be an integer-valued \code{"double"}. 532 533 \item \code{sQuote()} and \code{dQuote()} get an explicit \code{q} 534 argument with obvious default instead of using 535 \code{getOption("fancyQuotes")} implicitly and unconditionally. 536 537 \item \code{unzip()} can list archives with comments and with 538 spaces in file names even using an external \command{unzip} command. 539 540 \item Command line completion has a new setting 541 \code{rc.settings(dots = FALSE)} to remove \code{...} from the 542 list of possible function arguments. 543 544 \item \code{library()} no longer checks packages with compiled 545 code match \samp{R.version$platform}. \code{loadNamespace()} 546 never has, and increasingly the \sQuote{canonical name} does not 547 reflect the important characteristics of compiled code. 548 %% E.g. 32/64-bit compiler settings 549 550 \item The primitive functions \code{drop()} and \code{unclass()} 551 now avoid duplicating their data for atomic vectors that are large 552 enough, by returning \code{ALTREP} wrapper objects with adjusted 553 attributes. \R{}-level assignments to change attributes will also 554 use wrapper objects to avoid duplicating data for larger atomic 555 vectors. \R functions like \code{structure()} and \code{unname()} 556 will therefore not duplicate data in these settings. Generic 557 vectors as produced by \code{list()} are not yet covered by this 558 optimization but may be in due course. 559 560 \item In \code{formals()}, \code{envir} becomes an optional 561 argument instead of being hardwired. 562 563 \item Instead of signalling an error for an invalid S4 object 564 \code{x}, \code{str(x)} now gives a warning and subsequently still 565 shows most parts of \code{x}, e.g., when slots are missing. 566 567 \item \code{gamma(x)} and \code{lgamma(x)} no longer warn when 568 correctly returning \code{Inf} or underflowing to zero. This 569 helps maximum likelihood and similar computations. 570 571 \item \code{convertColor()} is now vectorized, so a lot faster for 572 converting many colours at once. The new argument 573 \code{vectorized} to \code{colorConverter()} ensures that 574 non-vectorized colour converters still work. (Thanks to Brodie 575 Gaslam.) 576 577 \item \code{download.file()} and \code{url()} get new argument 578 \code{headers} for custom HTTP headers, e.g., allowing to perform 579 basic http authentication, thanks to a patch contributed by Gábor 580 Csárdi. 581 582 \item File-based connection functions \code{file()}, 583 \code{gzfile()}, \code{bzfile()} and \code{xzfile()} now signal an 584 error when used on a directory. 585 586 \item For \code{approx()}, \code{splinefun()} \emph{etc}, a new 587 setting \code{ties = c("ordered", <fun>)} allows skipping the 588 sorting and still treat ties. 589 590 \item \code{format(x)} gives a more user friendly error message in 591 the case where no method is defined. A minimal method is provided 592 in \code{format.default(x)} when \code{isS4(x)} is true. 593 594 \item \code{which(x)} now also works when \code{x} is a long 595 vector, thanks to Suharto Anggono's \PR{17201}. \strong{NB}: this 596 may return a double result, breaking the previous guarantee of an 597 integer result. 598 599 \item \code{seq.default()} is more careful to return an 600 \code{integer} (as opposed to \code{double}) result when its 601 arguments are large and/or classed objects; see comment #9 of 602 Suharto Anggono's \PR{17497}. 603 604 \item The \code{plot()} method for \code{lm} and \code{glm} fits, 605 \code{plot.lm()}, gains a new option \code{iter.smooth} with a 606 default of \code{0} for binomial fits, no longer down-weighting 607 when smoothing the residuals. 608 609 \item \code{zip()} passes its list of files \emph{via} standard 610 input to the external command when too long for the command line 611 (on some platforms). 612 613 \item \code{data()} gains an \code{overwrite} argument. 614 615 \item \code{t.test()} now also returns the standard error (in 616 list component \code{stderr}). 617 618 \item \code{model.matrix(*, contrasts.arg = CC)} now warns about 619 invalid \code{contrasts.arg}s. 620 621 \item Performance of \code{substr()} and \code{substring()} has been 622 improved. 623 624 \item \code{stopifnot()} has been simplified thanks to Suharto 625 Anggono's proposals to become considerably faster for cheap 626 expressions. 627 628 \item The default \sQuote{user agent} has been changed when 629 accessing \samp{http://} and \samp{https://} sites using 630 \samp{libcurl}. (A site was found which caused \samp{libcurl} to 631 infinite-loop with the previous default.) 632 633 \item \code{sessionInfo()} now also contains \code{RNGkind()} and 634 prints it when it differs from the default; based on a proposal and 635 patch by Gabe Becker in \PR{17535}. 636 Also, \code{RNGversion(getRversion())} works directly. 637 638 \item \code{library()} and \code{require()} now allow more control 639 over handling search path conflicts when packages are 640 attached. The policy is controlled by the new 641 \code{conflicts.policy} option. 642 643 \item \code{barplot()} gets a formula method, thanks to a patch 644 proposal by Arni Magnusson in \PR{17521}. 645 646 \item \code{pmax()} and \code{pmin(x)} now also work for long 647 vectors, thanks to Suharto Anggono's \PR{17533}. 648 649 \item \code{bxp()} now warns when omitting duplicated arguments. 650 651 \item New \code{hcl.colors()} function to provide wide range of 652 HCL-based colour palettes with much better perceptual properties 653 than the existing RGB/HSV-based palettes like \code{rainbow()}. 654 655 Also a new \code{hcl.pals()} function to list available palette 656 names for \code{hcl.colors()}. 657 658 Contributed by Achim Zeileis. 659 660 \item The default colours for \code{image()} and 661 \code{filled.contour()} are now based on \code{hcl.colors()}. 662 663 \item The palette-generating functions \code{rainbow()}, 664 \code{gray.colors()}, etc.\sspace{}get a new \code{rev} argument 665 to facilitate reversing the order of colors. 666 667 \item New \code{str2lang()} and \code{str2expression()} as streamlined 668 versions of \code{parse(text=., keep.source=FALSE)} allow to abstract 669 typical call constructions, e.g., in \code{formula} manipulations. 670 (Somewhat experimental) % << TO DO 671 672 \item Add \code{update_PACKAGES()} for incrementally updating a 673 package repository index, instead of rebuilding the index from 674 scratch. Thanks to Gabe Becker in \PR{17544} for the patch, based 675 on part of his \pkg{switchr} package. 676 } 677 } 678 679 \subsection{INSTALLATION on a UNIX-ALIKE}{ 680 \itemize{ 681 \item The options selected for the C++ compiler default to the 682 C++11 standard if supported, otherwise to the C++98 standard. 683 684 \item Visibility macros such as \samp{C_VISIBILITY} can now be 685 user-set (including to empty), e.g.\sspace{}in \file{config.site}. 686 687 \item Macro \samp{FCLIBS}, which has sometimes been needed on 688 Solaris, has been renamed to \samp{FCLIBS_XTRA}. 689 690 \item Macro \samp{F77} is always set to the value of \samp{FC}, so 691 the latter should be set to user-select the Fortran compiler for 692 both fixed-form and free-form Fortran. In particular, 693 \command{gfortran} is now the first choice for \samp{F77}, not 694 \command{f95}. 695 696 Macros \samp{FFLAGS} and \samp{FCFLAGS} remain distinct to allow 697 for a compiler which needs a flag to select free- or fixed-form 698 Fortran (most use the source-file extension to choose: \file{.f} 699 is fixed-form and \file{.f90} and \file{.f95} are free-form). 700 701 If only one of them is set, its value is used for both. 702 703 \item The special-casing of \samp{CFLAGS}, \samp{CXXFLAGS} and 704 \samp{FFLAGS} for Intel compilers on Linux has been removed: we do 705 not have recent experience but the generic defaults now chosen are 706 the same as those previously special-cased for \samp{x86_64}. 707 708 If necessary, override the defaults on the \command{configure} 709 command line or in file \file{config.site}. 710 711 \item Long-untested \command{configure} support for HP-UX and very 712 old versions of Linux has been removed. 713 714 \item \command{configure --with-blas} (without specifying a value) 715 includes OpenBLAS in its search (before ATLAS and a generic 716 BLAS). This follows recent versions of the \samp{ax_blas} 717 autoconf macro. 718 719 \item The \command{configure} macro \samp{MAKEINFO} has been 720 updated to \samp{TEXI2ANY}. 721 722 \item Support for \command{make install-strip} has been enhanced. 723 } 724 } 725 726 \subsection{PACKAGE INSTALLATION}{ 727 \itemize{ 728 \item Source package installation is by default \sQuote{staged}: 729 the package is installed into a temporary location under the final 730 library directory and moved into place once the installation is 731 complete. The benefit is that partially-installed packages are 732 hidden from other \R sessions. 733 734 The overall default is set by environment variable 735 \env{R_INSTALL_STAGED}. \command{R CMD INSTALL} has new options 736 \option{--staged-install} and \option{--no-staged-install}, and 737 packages can use the \samp{StagedInstall} field in their 738 \file{DESCRIPTION} file to opt out. (That opt-out is a temporary 739 measure which may be withdrawn in future.) 740 741 Staged installation requires either \option{--pkglock} or 742 \option{--lock}, one of which is used by default. 743 744 \item The interpretation of source code with extension \file{.f} 745 is changing. Previously this denoted FORTRAN 77 code, but current 746 compilers no longer have a FORTRAN 77 mode and interpret it as 747 \sQuote{fixed-form} Fortran 90 (or later where supported) code. 748 Extensions \file{.f90} and \file{.f95} continue to indicate 749 \sQuote{free-form} Fortran code. 750 751 Legal FORTRAN 77 code is also legal fixed-form Fortran 9x; however 752 this change legitimizes the use of later features, in particular 753 to replace features marked \sQuote{obsolescent} in Fortran 90 and 754 \sQuote{deleted} in Fortran 2018 which \command{gfortran} 8.x and 755 later warn about. 756 757 \item Packages containing files in the \file{src} directory with 758 extensions \file{.f90} or \file{.f95} are now linked using the C 759 or C++ compiler rather than the Fortran 9x compiler. This is 760 consistent with fixed-form Fortran code and allows mixing of C++ 761 and free-form Fortran on most platforms. 762 763 Consequentially, a package which includes free-form Fortran 9x 764 code which uses OpenMP should include \samp{SHLIB_OPENMP_CFLAGS} 765 (or the \samp{CXXFLAGS} version if they also include C++ code) in 766 \samp{PKG_LIBS} rather than \samp{SHLIB_OPENMP_FCFLAGS} --- 767 fortunately on almost all current platforms they are the same 768 flag. 769 770 \item Macro \samp{PKG_FFLAGS} will be used for the compilation of 771 both fixed-form and free-form Fortran code unless 772 \samp{PKG_FCFLAGS} is also set (in \file{src/Makevars} or 773 \file{src/Makevars.win}). 774 775 \item The make macro \samp{F_VISIBILITY} is now preferred for 776 both fixed-form and free-form Fortran, for use in 777 \file{src/Makevars} and similar. 778 779 \item \command{R CMD INSTALL} gains a new option \option{--strip} 780 which (where supported) strips installed shared object(s): this 781 can also be achieved by setting the environment variable 782 \env{_R_SHLIB_STRIP_} to a true value. 783 784 The new option \option{--strip-lib} attempts stripping of 785 static and shared libraries installed under \file{lib}. 786 787 These are most useful on platforms using GNU \code{binutils} (such 788 as Linux) and compiling with \option{-g} flags. 789 790 \item There is more support for installing UTF-8-encoded packages 791 in a strict Latin-1 locale (and probably for other Latin locales): 792 non-ASCII comments in \R code (and \file{NAMESPACE} files) are 793 worked around better. 794 } 795 } 796 797 \subsection{UTILITIES}{ 798 \itemize{ 799 \item \command{R CMD check} now optionally checks makefiles for 800 correct and portable use of the \samp{SHLIB_OPENMP_*FLAGS} macros. 801 802 \item \command{R CMD check} now evaluates \code{\\Sexpr{}} 803 expressions (including those in macros) before checking the 804 contents of \file{Rd} files and so detects issues both in 805 evaluating the expressions and in the expanded contents. 806 807 \item \command{R CMD check} now lists missing packages separated 808 by commas and with regular quotes such as to be useful as argument 809 in calling \code{install.packages(c(..))}; from a suggestion by 810 Marcel Ramos. 811 812 \item \code{tools::Rd2latex()} now uses UTF-8 as its default 813 output encoding. 814 815 \item \command{R CMD check} now checks line endings of files with 816 extension \file{.hpp} and those under \file{inst/include}. The 817 check now includes that a non-empty file is terminated with a 818 newline. 819 820 \command{R CMD build} will correct line endings in such files. 821 822 \item \command{R CMD check} now tries re-building all vignettes 823 rather than stopping at the first error: whilst doing so it adds 824 \sQuote{bookmarks} to the log. By default (see the \sQuote{R 825 Internals} manual) it re-builds each vignette in a separate 826 process. 827 828 It now checks for duplicated vignette titles (also known as 829 \sQuote{index entries}): they are used as hyperlinks on 830 \acronym{CRAN} package pages and so do need to be unique. 831 832 \item \command{R CMD check} has more comprehensive checks on the 833 \file{data} directory and the functioning of \code{data()} in a 834 package. 835 836 \item \command{R CMD check} now checks 837 \command{autoconf}-generated \file{configure} files have their 838 corresponding source files, including optionally attempting to 839 regenerate them on platforms with \command{autoreconf}. 840 841 \item \command{R CMD build} has a new option 842 \option{--compression} to select the compression used for the tarball. 843 844 \item \command{R CMD build} now removes \file{src/*.mod} files on 845 all platforms. 846 } 847 } 848 849 \subsection{C-LEVEL FACILITIES}{ 850 \itemize{ 851 \item New pointer protection C functions \code{R_PreserveInMSet} and 852 \code{R_ReleaseFromMSet} have been introduced to replace 853 \code{UNPROTECT_PTR}, which is not safe to mix with \code{UNPROTECT} 854 (and with \code{PROTECT_WITH_INDEX}). Intended for use in parsers 855 only. 856 857 \item \code{NAMEDMAX} has been raised to 7 to allow further 858 protection of intermediate results from (usually ill-advised) 859 assignments in arguments to \code{BUILTIN} functions. Properly 860 written package code should not be affected. 861 862 \item \code{R_unif_index} is now considered to be part of the C API. 863 864 \item \code{R_GetCurrentEnv()} allows C code to retrieve the current 865 environment. 866 } 867 } 868 869 \subsection{DEPRECATED AND DEFUNCT}{ 870 \itemize{ 871 \item Argument \code{compressed} of \code{untar()} is 872 deprecated --- it is only used for external \code{tar} commands 873 which increasingly for extraction auto-detect compression and 874 ignore their \option{zjJ} flags. 875 876 \item \code{var(f)} and hence \code{sd(f)} now give an error for 877 \code{factor} arguments; they gave a deprecation warning since \R 878 3.2.3, \PR{16564}. 879 880 \item Package \pkg{tools}' \code{vignetteDepends()} has been 881 deprecated (it called a function deprecated since Feb 2016), being 882 partly replaced by newly exported \code{vignetteInfo()}. 883 884 \item The \command{f77_f2c} script has been removed: it 885 no longer sufficed to compile the \file{.f} files in \R. 886 887 \item The deprecated legacy support of \command{make} macros such 888 as \samp{CXX1X} has been removed: use the \samp{CXX11} forms 889 instead. 890 891 \item Make macro \samp{F77_VISIBILITY} is deprecated in favour of 892 \samp{F_VISIBILITY}. 893 894 \item Make macros \samp{F77}, \samp{FCPIFCPLAGS} and 895 \samp{SHLIB_OPENMP_FCFLAGS} are deprecated in favour of \samp{FC}, 896 \samp{FPICFLAGS} and \samp{SHLIB_OPENMP_FFLAGS} respectively. 897 898 \item \code{$.data.frame} had become an expensive version of 899 the default method, so has been removed. (Thanks to Radford Neal 900 for picking this up and to Duncan Murdoch for providing a patch.) 901 } 902 } 903 904 \subsection{BUG FIXES}{ 905 \itemize{ 906 \item \code{replayPlot(r)} now also works in the same \R session 907 when \code{r} has been \dQuote{reproduced} from serialization, 908 typically after saving to and reading from an RDS file. 909 910 \item \code{substr()} and \code{substring()} now signal an error 911 when the input is invalid UTF-8. 912 913 \item \code{file.copy()} now works also when its argument \code{to} 914 is of length greater than one. 915 916 \item \code{mantelhaen.test()} no longer suffers from integer 917 overflow in largish cases, thanks to Ben Bolker's \PR{17383}. 918 919 \item Calling \code{setGeneric("foo")} in a package no longer 920 fails when the enclosing environment of the implicit generic 921 \code{foo()} is \code{.GlobalEnv}. 922 923 \item \code{untar(file("<some>.tar.gz"), *)} now gives a better 924 error message, suggesting to use \code{gzfile()} instead. 925 926 \item Method dispatch uses more relevant environments when looking 927 up class definitions. 928 929 \item The documentation for \code{identify()} incorrectly claimed 930 that the indices of identified points were returned in the order 931 that the points were selected. \code{identify()} now has a new 932 argument \code{order} to allow the return value to include the 933 order in which points were identified; the documentation has been 934 updated. Reported by Richard Rowe and Samuel Granjeaud. 935 936 \item \code{order(...., decreasing=c(TRUE, FALSE))} could fail in 937 some cases. Reported from StackOverflow via Karl Nordström. 938 939 \item User macros in Rd files now accept empty and multi-line 940 arguments. 941 942 \item Changes in \code{print.*()}, thanks to Lionel Henry's 943 patches in \PR{17398}: 944 \itemize{ 945 \item Printing lists, pairlists or attributes containing calls 946 with S3 class no longer evaluate those. 947 948 \item Printing S4 objects within lists and pairlists dispatches 949 with \code{show()} rather than \code{print()}, as with 950 auto-printing. 951 952 \item The indexing tags (names or \code{[[<n>]]}) of recursive 953 data structures are now printed correctly in complex cases. 954 955 \item Arguments supplied to \code{print()} are now properly 956 forwarded to methods when printing lists, pairlists or 957 attributes containing S3 objects. 958 959 \item The print parameters are now preserved when printing S3 960 objects or deparsing symbols and calls. Previously, printing 961 lists containing S3 objects or expressions would reset these 962 parameters. 963 964 \item Printing lists, pairlists or attributes containing 965 functions now uses \code{srcref} attributes if present. 966 } 967 968 \item Calling \code{install.packages()} with a length zero 969 \code{pkgs} argument now is a no-op (\PR{17422}). 970 971 \item \code{unlist(x)} now returns a correct \code{factor} when 972 \code{x} is a nested list with factor leaves, fixing \PR{12572} 973 and \PR{17419}. 974 975 \item The documentation \code{help(family)} gives more details 976 about the \code{aic} component, thanks to Ben Bolker's prompting. 977 978 \item The documentation for \code{attributes} and 979 \code{`attributes<-`} now gives \code{x} as name of the first and 980 main argument which the implementation has been requiring, fixing 981 \PR{17434}. For consistency, the first argument name is also 982 changed from \code{obj} to \code{x} for \code{`mostattributes<-`}. 983 984 \item \code{strwidth()} now uses \code{par("font")} as default 985 font face (\PR{17352}). 986 987 \item \code{plot(<table>, log="x")} no longer warns about \code{log}. 988 989 \item The \code{print()} method for \code{"htest"} objects now 990 formats the test statistic and parameter directly and hence no 991 longer rounds to units \emph{before} the decimal point. Consequently, 992 printing of \code{t.test()} results with a small number of digits 993 now shows non-large \code{df}'s to the full precision (\PR{17444}). 994 995 \item \code{kruskal.test()} and \code{fligner.test()} no longer 996 erroneously insist on numeric \code{g} group arguments (\PR{16719}). 997 998 \item Printing a news db via the browser now does a much better 999 job (\PR{17433}). 1000 1001 \item \code{print.aov()} missed column names in the multivariate case 1002 due to misspelling (reported by Chris Andrews). 1003 1004 \item \code{axis()} now creates valid \code{at} locations also for 1005 small subnormal number ranges in log scale plots. 1006 1007 \item \code{format.POSIXlt()} now also recycles the \code{zone} 1008 and \code{gmtoff} list components to full length when needed, 1009 and its internal C code detects \code{have_zone} in more cases. 1010 In some cases, this changes its output to become compatible with 1011 \code{format.POSIXct()}. 1012 1013 \item On Windows, \code{detectCores()} in package \pkg{parallel} 1014 now detects processors in all processor groups, not just the group 1015 \R is running in (impacts particularly systems with more than 64 1016 logical processors). Reported by Arunkumar Srinivasan. 1017 1018 \item On Windows, \code{socketSelect()} would hang with more than 1019 64 sockets, and hence \code{parallel::clusterApplyLB()} would hang 1020 with more than 64 workers. Reported by Arunkumar Srinivasan. 1021 1022 \item \code{as(1L, "double")} now does coerce (\PR{17457}). 1023 1024 \item \code{lm.influence()}, \code{influence.measures()}, 1025 \code{rstudent()} etc now work (more) correctly for multivariate 1026 models (\code{"mlm"}), thanks to (anonymous) stackoverflow remarks. 1027 1028 \item \code{sample.int(2.9, *, replace=TRUE)} again behaves as 1029 documented and as in R < 3.0.0, namely identically to 1030 \code{sample.int(2, ..)}.% consider back porting to 3.5.x ! 1031 1032 \item Fixes to \code{convertColor()} for chromatic adaptation; 1033 thanks to Brodie Gaslam \PR{17473}. 1034 1035 \item Using \code{\\Sexpr[stage=install]{..}} to create an 1036 \file{Rd} section no longer gives a warning in \command{R CMD 1037 check}; problem originally posted by Gábor Csárdi, then reported 1038 as \PR{17479} with a partial patch by Duncan Murdoch. 1039 1040 \item Parse data now include a special node for equal assignment. 1041 1042 \item \code{split.default()} no longer relies on \code{[[<-()}, so 1043 it behaves as expected when splitting an object by a factor with 1044 the empty string as one of its levels. Thanks to Brad Friedman for 1045 the report. 1046 1047 \item Line numbers in messages about \file{.Rd} files are now more 1048 reliable, thanks to a patch from Duncan Murdoch. 1049 1050 \item In the \code{numeric} method for \code{all.equal()}, a 1051 numeric \code{scale} argument is now checked to be positive and 1052 allowed to be of length > 1. (The latter worked originally and 1053 with a warning in recent years). 1054 1055 \item Deferred string conversions now record the \code{OutDec} 1056 option setting when not equal to the default. Reported by Michael 1057 Sannella. 1058 1059 \item When \code{y} is numeric and \code{f} a \code{factor}, 1060 \code{plot(y ~ f)} nicely uses "y" and "f" as y- and x-labels. 1061 The more direct \code{boxplot(y ~ f)} now does too. The new 1062 argument \code{ann = FALSE} may be used to suppress these. 1063 1064 \item Subassignment to no/empty rows of a data frame is more 1065 consistent and typically a no-op in all cases instead of sometimes 1066 an error; part of Emil Bode's \PR{17483}. 1067 1068 \item Calls like \code{formatC(*, zero.print = "< 0.001")} no 1069 longer give an error and are further improved via new optional 1070 argument \code{replace.zero}. Reported by David Hugh-Jones. 1071 1072 \item \code{methods::formalArgs("<fn>")} now finds the same 1073 function as \code{formals("<fn>")}, fixing Emil Bode's \PR{17499}. 1074 1075 \item The \pkg{methods} package better handles duplicated class 1076 names across packages. 1077 1078 \item The default method of \code{seq()} now avoids integer 1079 overflow, thanks to the report and "cumsum" patch of Suharto 1080 Anggono's \PR{17497}. 1081 1082 \item \code{sub()} no longer loses encodings for non-ASCII 1083 replacements (\PR{17509}). 1084 1085 \item Fix for rotated raster image on X11 device. (Partial 1086 fix for \PR{17148}; thanks to Mikko Korpela). 1087 1088 \item \code{formula(model.frame(frml, ..))} now returns \code{frml} 1089 in all cases, thanks to Bill Dunlap. The previous behavior is 1090 available as \code{DF2formula(<model.frame>)}. 1091 1092 \item \code{ar.ols()} also returns scalar \code{var.pred} in 1093 univariate case (\PR{17517}). 1094 1095 \item \code{normalizePath()} now treats \code{NA} path as non-existent 1096 and normalizes it to \code{NA}. \code{file.access()} treats \code{NA} 1097 file name as non-existent. \code{file.edit()} and connection 1098 functions such as \code{file()} now treat \code{NA} file names as 1099 errors. 1100 1101 \item The internal \code{regularize.values()} auxiliary of 1102 \code{approx()}, \code{splinefun()} etc now warns again when there 1103 are ties and the caller did not specify \code{ties}. Further, it no 1104 longer duplicates \code{x} and \code{y} unnecessarily when \code{x} 1105 is already sorted (\PR{17515}). 1106 1107 \item \code{strtoi("", base)} now gives \code{NA} on all platforms, 1108 following its documentation. Reported by Michael Chirico. 1109 1110 \item In the definition of an S4 class, prototype elements are 1111 checked against the slots of the class, with giving a prototype 1112 for an undefined slot now being an error. (Reported by Bill 1113 Dunlap.) 1114 1115 \item From \code{setClassUnion()}, if environment variable 1116 \env{_R_METHODS_SHOW_CHECKSUBCLASSES} is set 1117 to true, the internal \code{.checkSubclasses()} utility prints 1118 debugging info to see where it is used. 1119 1120 \item \code{max.col(m)} with an \code{m} of zero columns now 1121 returns integer \code{NA} (instead of \code{1}). 1122 1123 \item \code{axTicks()} no longer returns small \dQuote{almost zero} 1124 numbers (in exponential format) instead of zero, fixing Ilario 1125 Gelmetti's \PR{17534}. 1126 1127 \item \code{isSymmetric(matrix(0, dimnames=list("A","b")))} is 1128 \code{FALSE} again, as always documented. 1129 1130 \item The \code{cairo_pdf} graphics device (and other Cairo-based 1131 devices) now clip correctly to the right and bottom border. 1132 1133 There was an off-by-one-pixel bug, reported by Lee Kelvin. 1134 1135 \item \code{as.roman(3) <= 2:4} and all other comparisons now work, 1136 as do group \code{"Summary"} function calls such as 1137 \code{max(as.roman(sample(20)))} and \code{as.roman(NA)}. 1138 (Partly reported by Bill Dunlap in \PR{17542}.) 1139 1140 \item \code{reformulate("x", response = "sin(y)")} no longer produces 1141 extra back quotes, \PR{17359}, and gains new optional argument 1142 \code{env}. 1143 1144 \item When reading console input from \file{stdin} with re-encoding 1145 (\command{R --encoding=enc < input}) the code on a Unix-alike now 1146 ensures that each converted input line is terminated with a 1147 newline even if re-encoding fails. 1148 1149 \item \code{as.matrix.data.frame()} now produces better strings from 1150 logicals, thanks to \PR{17548} from Gabe Becker. 1151 1152 \item The S4 generic signature of \code{rowSums()}, 1153 \code{rowMeans()}, \code{colSums()} and \code{colMeans()} is 1154 restricted to \code{"x"}. 1155 1156 \item \code{match(x, tab)} now works for long \emph{character} 1157 vectors \code{x}, thanks to \PR{17552} by Andreas Kersting. 1158 1159 \item Class unions are unloaded when their namespace is 1160 unloaded (\PR{17531}, adapted from a patch by Brodie Gaslam). 1161 1162 \item \code{selectMethod()} is robust to ANY-truncation of method 1163 signatures (thanks to Herve Pages for the report). 1164 } 1165 } 1166} 1167 1168\section{\Rlogo CHANGES IN R 3.5.3}{ 1169 1170 \subsection{INSTALLATION on a UNIX-ALIKE}{ 1171 \itemize{ 1172 \item Detection of flags for C++98/11/14/17 has been improved: in 1173 particular if CXX??STD is set, it is tried first with no 1174 additional flags. 1175 } 1176 } 1177 1178 \subsection{PACKAGE INSTALLATION}{ 1179 \itemize{ 1180 \item New macro \samp{F_VISIBILITY} as an alternative to 1181 \samp{F77_VISIBILITY}. This will become the preferred form in 1182 \R 3.6.0. 1183 } 1184 } 1185 1186 \subsection{BUG FIXES}{ 1187 \itemize{ 1188 \item \code{writeLines(readLines(fnam), fnam)} now works as expected, 1189 thanks to Peter Meissner's \PR{17528}. 1190 1191 \item \code{setClassUnion()} no longer warns, but uses \code{message()} 1192 for now, when encountering \dQuote{non local} subclasses of class members. 1193 1194 \item \code{stopifnot(exprs = T)} no longer fails. 1195 } 1196 } 1197} 1198 1199\section{\Rlogo CHANGES IN R 3.5.2}{ 1200 1201 \subsection{PACKAGE INSTALLATION}{ 1202 \itemize{ 1203 \item New macro \samp{CXX_VISIBILITY} analogous to 1204 \samp{C_VISIBILITY} (which several packages have been misusing for 1205 C++ code) for the default C++ compiler (but not necessarily one used 1206 for non-default C++ dialects like C++14). 1207 } 1208 } 1209 1210 \subsection{TESTING}{ 1211 \itemize{ 1212 \item The random number generator tests in 1213 \file{tests/p-r-random-tests.R} no longer fail occasionally as 1214 they now randomly sample from \dQuote{certified} random seeds. 1215 } 1216 } 1217 1218 \subsection{BUG FIXES}{ 1219 \itemize{ 1220 \item The \code{"glm"} method of \code{drop1()} miscalculated the 1221 score test (\code{test="Rao"}) when the model contained an offset. 1222 1223 \item Linear multiple empty models such as \code{lm(y ~ 0)} 1224 now have a correctly dimensioned empty coefficient matrix; 1225 reported by Brett Presnell. 1226 1227 \item \code{vcov(<empty mlm>)} and hence \code{confint()} now 1228 work (via a consistency change in \code{summary.lm()}). 1229 1230 \item \code{confint(<multiple lm()>)} now works correctly; 1231 reported on R-devel by Steven Pav. 1232 1233 \item \code{quade.test()} now also works correctly when its 1234 arguments are not yet sorted along \code{groups}, fixing \PR{15842}. 1235 1236 \item Installation on a Unix-alike tries harder to link to the 1237 \samp{pthread} library where required (rather than relying on 1238 OpenMP to provide it: configuring with \option{--disable-openmp} 1239 was failing on some Linux systems). 1240 1241 \item The \code{data.frame} method for \code{print(x)} is fast now 1242 also for large data frames \code{x} and got an optional argument 1243 \code{max}, thanks to suggestions by Juan Telleria. 1244 1245 \item \code{hist()} no longer integer overflows in very rare 1246 cases, fixing \PR{17450}. 1247 1248 \item \code{untar()} ignored a character \code{compressed} 1249 argument: however many external \command{tar} programs ignore 1250 the flags which should have been set and automagically choose the 1251 compression type, and if appropriate \command{gzip} or 1252 \command{bzip2} compression would have been chosen from the magic 1253 header of the tarball. 1254 1255 \item \code{zapsmall(x)} now works for more \dQuote{number-like} objects. 1256 1257 \item The tools-internal function called from \command{R CMD 1258 INSTALL} now gets a \code{warnOption = 1} argument and only sets 1259 \code{options(warn = warnOption)} when that increases the warning 1260 level (\PR{17453}). 1261 1262 \item Analogously, the tools-internal function called from \command{R CMD 1263 check} gets a \code{warnOption = 1} argument and uses the larger 1264 of that and \code{getOption("warn")}, also allowing to be run with 1265 increased warning level. 1266 1267 \item Parse data now have deterministic parent nodes (\PR{16041}). 1268 1269 \item Calling \code{match()} with length one \code{x} and POSIXlt 1270 \code{table} gave a segfault (\PR{17459}). 1271 1272 \item Fork clusters could hang due to a race condition in cluster 1273 initialization (\code{makeCluster()}). 1274 1275 \item \code{nextn(n)} now also works for larger \code{n} and no 1276 longer loops infinitely for e.g, \code{n <- 214e7}. 1277 1278 \item \code{cooks.distance()} and \code{rstandard()} now work 1279 correctly for multiple linear models (\code{"mlm"}). 1280 1281 \item \code{polym()} and corresponding \code{lm()} prediction now 1282 also work for a boundary "vector" case fixing \PR{17474}, 1283 reported by Alexandre Courtiol. 1284 1285 \item With a very large number of variables \code{terms()} could 1286 segfault (\PR{17480}). 1287 1288 \item \code{cut(rep(0, 7))} now works, thanks to Joey Reid and 1289 Benjamin Tyner (\PR{16802}). 1290 1291 \item \code{download.file(*, method = "curl", cacheOK = FALSE)} 1292 should work now on Windows, thanks to Kevin Ushey's patch in 1293 \PR{17323}. 1294 1295 \item \code{duplicated(<dataframe with 'f'>)} now works, too, 1296 thanks to Andreas Kersting's \PR{17485}; ditto for 1297 \code{anyDuplicated()}. 1298 1299 \item \code{legend(*, cex = 1:2)} now works less badly. 1300 1301 \item The \code{print()} method for \code{POSIXct} and 1302 \code{POSIXlt} now correctly obeys \code{getOption("max.print")}, 1303 fixing a long-standing typo, and it also gets a corresponding 1304 optional \code{max} argument. 1305 1306 \item Unserialization of raw vectors serialized in ASCII 1307 representation now works correctly. 1308 1309 \item \code{<data frame>[TRUE, <new>] <- list(c1, c2)} now works 1310 correctly, thanks to Suharto Anggono's \PR{15362} and Emil Bode's 1311 patch in \PR{17504}. 1312 1313 \item \code{seq.int(*, by=by, length=n)} no longer wrongly 1314 \dQuote{drops fractional parts} when \code{by} is integer, thanks 1315 to Suharto Anggono's report \PR{17506}. 1316 1317 \item Buffering is disabled for \code{file()} connections to 1318 non-regular files (like sockets), as well as \code{fifo()} and 1319 \code{pipe()} connections. Fixes \PR{17470}, reported by Chris 1320 Culnane. 1321 } 1322 } 1323} 1324 1325\section{\Rlogo CHANGES IN R 3.5.1}{ 1326 1327 \subsection{BUG FIXES}{ 1328 \itemize{ 1329 \item \code{file("stdin")} is no longer considered seekable. 1330 1331 \item \code{dput()} and \code{dump()} are no longer truncating 1332 when \code{options(deparse.max.lines = *)} is set. 1333 1334 \item Calls with an S3 class are no longer evaluated when printed, 1335 fixing part of \PR{17398}, thanks to a patch from Lionel Henry. 1336 1337 \item Allow \code{file} argument of \command{Rscript} to include space 1338 even when it is first on the command line. 1339 1340 \item \code{callNextMethod()} uses the generic from the 1341 environment of the calling method. Reported by Hervé Pagès with 1342 well documented examples. 1343 1344 \item Compressed file connections are marked as blocking. 1345 1346 \item \code{optim(*, lower = c(-Inf, -Inf))} no longer warns (and 1347 switches the method), thanks to a suggestion by John Nash. 1348 1349 \item \code{predict(fm, newdata)} is now correct also for models 1350 where the formula has terms such as \code{splines::ns(..)} or 1351 \code{stats::poly(..)}, fixing \PR{17414}, based on a patch from 1352 Duncan Murdoch. 1353 1354 \item \code{simulate.lm(glm(*, gaussian(link = <non-default>)))} 1355 has been corrected, fixing \PR{17415} thanks to Alex Courtiol. 1356 1357 \item \code{unlist(x)} no longer fails in some cases of nested 1358 empty lists. Reported by Steven Nydick. 1359 1360 \item \code{qr.coef(qr(<all 0, w/ colnames>))} now works. 1361 Reported by Kun Ren. 1362 1363 \item The radix sort is robust to vectors with >1 billion elements 1364 (but long vectors are still unsupported). Thanks to Matt Dowle for 1365 the fix. 1366 1367 \item Terminal connections (e.g., stdin) are no longer 1368 buffered. Fixes \PR{17432}. 1369 1370 \item \code{deparse(x)}, \code{dput(x)} and \code{dump()} now 1371 respect \code{c()}'s argument names \code{recursive} and 1372 \code{use.names}, e.g., for \code{x <- setNames(0, "recursive")}, 1373 thanks to Suharto Anggono's \PR{17427}. 1374 1375 \item Unbuffered connections now work with encoding conversion. 1376 Reported by Stephen Berman. 1377 1378 \item \file{.Renviron} on Windows with \command{Rgui} is again by 1379 default searched for in user documents directory when invoked 1380 \emph{via} the launcher icon. Reported by Jeroen Ooms. 1381 1382 \item \code{printCoefmat()} now also works with explicit 1383 \code{right=TRUE}. 1384 1385 \item \code{print.noquote()} now also works with explicit 1386 \code{quote=FALSE}. 1387 1388 \item The default method for \code{pairs(.., horInd=*, verInd=*)} 1389 now gets the correct order, thanks to reports by Chris Andrews and 1390 Gerrit Eichner. Additionally, when \code{horInd} or \code{verInd} 1391 contain only a subset of variables, all the axes are labeled 1392 correctly now. 1393 1394 \item \code{agrep("..|..", .., fixed=FALSE)} now matches when it 1395 should, thanks to a reminder by Andreas Kolter. 1396 1397 \item \code{str(ch)} now works for more invalid multibyte strings. 1398 } 1399 } 1400} 1401 1402\section{\Rlogo CHANGES IN R 3.5.0}{ 1403 1404 \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{ 1405 \itemize{ 1406 \item All packages are by default byte-compiled on installation. 1407 This makes the installed packages larger (usually marginally so) 1408 and may affect the format of messages and tracebacks (which often 1409 exclude \code{.Call} and similar). 1410 } 1411 } 1412 1413 \subsection{NEW FEATURES}{ 1414 \itemize{ 1415 \item \code{factor()} now uses \code{order()} to sort its levels, 1416 rather than \code{sort.list()}. This allows \code{factor()} to 1417 support custom vector-like objects if methods for the appropriate 1418 generics are defined. It has the side effect of making 1419 \code{factor()} succeed on empty or length-one non-atomic 1420 vector(-like) types (e.g., \code{"list"}), where it failed before. 1421 1422 \item \code{diag()} gets an optional \code{names} argument: this 1423 may require updates to packages defining S4 methods for it. 1424 1425 \item \code{chooseCRANmirror()} and \code{chooseBioCmirror()} no 1426 longer have a \code{useHTTPS} argument, not needed now all \R 1427 builds support \samp{https://} downloads. 1428 1429 \item New \code{summary()} method for \code{warnings()} with a 1430 (somewhat experimental) \code{print()} method. 1431 1432 \item (\pkg{methods} package.) \code{.self} is now automatically 1433 registered as a global variable when registering a reference class 1434 method. 1435 1436 \item \code{tempdir(check = TRUE)} recreates the \code{tempdir()} 1437 directory if it is no longer valid (e.g.\sspace{}because some 1438 other process has cleaned up the \file{/tmp} directory). 1439 1440 \item New \code{askYesNo()} function and \code{"askYesNo"} option 1441 to ask the user binary response questions in a customizable but 1442 consistent way. (Suggestion of \PR{17242}.) 1443 1444 \item New low level utilities \code{...elt(n)} and \code{...length()} 1445 for working with \code{...} parts inside a function. 1446 1447 \item \code{isTRUE()} is more tolerant and now true 1448 in \preformatted{ x <- rlnorm(99) 1449 isTRUE(median(x) == quantile(x)["50\%"])} 1450 New function \code{isFALSE()} defined analogously to \code{isTRUE()}. 1451 1452 \item The default symbol table size has been increased from 4119 1453 to 49157; this may improve the performance of symbol resolution 1454 when many packages are loaded. (Suggested by Jim Hester.) 1455 1456 \item \code{line()} gets a new option \code{iter = 1}. 1457 1458 \item Reading from connections in text mode is buffered, 1459 significantly improving the performance of \code{readLines()}, as 1460 well as \code{scan()} and \code{read.table()}, at least when 1461 specifying \code{colClasses}. 1462 1463 \item \code{order()} is smarter about picking a default sort 1464 \code{method} when its arguments are objects. 1465 1466 \item \code{available.packages()} has two new arguments which 1467 control if the values from the per-session repository cache are 1468 used (default true, as before) and if so how old cached values can 1469 be used (default one hour). 1470 1471 These arguments can be passed from \code{install.packages()}, 1472 \code{update.packages()} and functions calling that: to enable 1473 this \code{available.packages()}, \code{packageStatus()} and 1474 \code{download.file()} gain a \code{\dots} argument. 1475 1476 \item \code{packageStatus()}'s \code{upgrade()} method no longer 1477 ignores its \code{\dots} argument but passes it to 1478 \code{install.packages()}. 1479 1480 \item \code{installed.packages()} gains a \code{\dots} argument to 1481 allow arguments (including \code{noCache}) to be passed from 1482 \code{new.packages()}, \code{old.packages()}, 1483 \code{update.packages()} and \code{packageStatus()}. 1484 1485 \item \code{factor(x, levels, labels)} now allows duplicated 1486 \code{labels} (not duplicated \code{levels}!). Hence you can map 1487 different values of \code{x} to the same level directly. 1488 1489 \item Attempting to use \code{names<-()} on an S4 derivative of a 1490 basic type no longer emits a warning. 1491 1492 \item The \code{list} method of \code{within()} gains an option 1493 \code{keepAttrs = FALSE} for some speed-up. 1494 1495 \item \command{system()} and \command{system2()} now allow the 1496 specification of a maximum elapsed time (\sQuote{timeout}). 1497 1498 \item \code{debug()} supports debugging of methods on any object 1499 of S4 class \code{"genericFunction"}, including group generics. 1500 1501 \item Attempting to increase the length of a variable containing 1502 \code{NULL} using \code{length()<-} still has no effect on the 1503 target variable, but now triggers a warning. 1504 1505 \item \code{type.convert()} becomes a generic function, with 1506 additional methods that operate recursively over list and 1507 \code{data.frame} objects. Courtesy of Arni Magnusson 1508 (\PR{17269}). 1509 1510 \item \code{lower.tri(x)} and \code{upper.tri(x)} only needing 1511 \code{dim(x)} now work via new functions \code{.row()} and 1512 \code{.col()}, so no longer call \code{as.matrix()} by default in 1513 order to work efficiently for all kind of matrix-like objects. 1514 1515 \item \code{print()} methods for \code{"xgettext"} and 1516 \code{"xngettext"} now use \code{encodeString()} which keeps, 1517 e.g.\sspace{}\code{"\n"}, visible. (Wish of \PR{17298}.) 1518 1519 \item \code{package.skeleton()} gains an optional \code{encoding} 1520 argument. 1521 1522 \item \code{approx()}, \code{spline()}, \code{splinefun()} and 1523 \code{approxfun()} also work for long vectors. 1524 1525 %% one item with several paragraphs 1526 \item \code{deparse()} and \code{dump()} are more useful for S4 1527 objects, \code{dput()} now using the same internal C code instead 1528 of its previous imperfect workaround R code. S4 objects now 1529 typically deparse perfectly, i.e., can be recreated identically 1530 from deparsed code. 1531 1532 \code{dput()}, \code{deparse()} and \code{dump()} now print the 1533 \code{names()} information only once, using the more readable 1534 \code{(tag = value)} syntax, notably for \code{list()}s, i.e., 1535 including data frames. 1536 1537 These functions gain a new control option \code{"niceNames"} (see 1538 \code{.deparseOpts()}), which when set (as by default) also uses 1539 the \code{(tag = value)} syntax for atomic vectors. On the other 1540 hand, without deparse options \code{"showAttributes"} and 1541 \code{"niceNames"}, names are no longer shown also for lists. 1542 \code{as.character(list( c (one = 1)))} now includes the name, as 1543 \code{as.character(list(list(one = 1)))} has always done. 1544 1545 \code{m:n} now also deparses nicely when \eqn{m > n}. 1546 1547 The \code{"quoteExpressions"} option, also part of \code{"all"}, 1548 no longer \code{quote()}s formulas as that may not re-parse 1549 identically. (\PR{17378}) 1550 1551 \item If the option \code{setWidthOnResize} is set and \code{TRUE}, 1552 \R run in a terminal using a recent \code{readline} library will 1553 set the \code{width} option when the terminal is 1554 resized. Suggested by Ralf Goertz. 1555 1556 \item If multiple \code{on.exit()} expressions are set using 1557 \code{add = TRUE} then all expressions will now be run even if one 1558 signals an error. 1559 1560 \item \code{mclapply()} gets an option \code{affinity.list} which 1561 allows more efficient execution with heterogeneous processors, 1562 thanks to Helena Kotthaus. 1563 1564 \item The \code{character} methods for \code{as.Date()} and 1565 \code{as.POSIXlt()} are more flexible \emph{via} new arguments 1566 \code{tryFormats} and \code{optional}: see their help pages. 1567 1568 \item \code{on.exit()} gains an optional argument \code{after} 1569 with default \code{TRUE}. Using \code{after = FALSE} with 1570 \code{add = TRUE} adds an exit expression before any 1571 existing ones. This way the expressions are run in a first-in 1572 last-out fashion. (From Lionel Henry.) 1573 1574 \item On Windows, \code{file.rename()} internally retries the 1575 operation in case of error to attempt to recover from possible 1576 anti-virus interference. 1577 1578 \item Command line completion on \samp{::} now also includes 1579 lazy-loaded data. 1580 1581 \item If the \env{TZ} environment variable is set when date-time 1582 functions are first used, it is recorded as the session default 1583 and so will be used rather than the default deduced from the OS 1584 if \env{TZ} is subsequently unset. 1585 1586 \item There is now a \code{[} method for class \code{"DLLInfoList"}. 1587 1588 \item \code{glm()} and \code{glm.fit} get the same 1589 \code{singular.ok = TRUE} argument that \code{lm()} has had 1590 forever. As a consequence, in \code{glm(*, method = <your_own>)}, 1591 user specified methods need to accept a \code{singular.ok} 1592 argument as well. 1593 1594 \item \code{aspell()} gains a filter for Markdown (\file{.md} and 1595 \file{.Rmd}) files. 1596 1597 \item \code{intToUtf8(multiple = FALSE)} gains an argument to 1598 allow surrogate pairs to be interpreted. 1599 1600 \item The maximum number of DLLs that can be loaded into R 1601 e.g.\sspace{}\emph{via} \code{dyn.load()} has been increased up to 614 1602 when the OS limit on the number of open files allows. 1603 1604 \item \code{Sys.timezone()} on a Unix-alike caches the value at 1605 first use in a session: \emph{inter alia} this means that setting 1606 \env{TZ} later in the session affects only the \emph{current} time 1607 zone and not the \emph{system} one. 1608 1609 \code{Sys.timezone()} is now used to find the system timezone to 1610 pass to the code used when \R is configured with 1611 \option{--with-internal-tzcode}. 1612 1613 \item When \code{tar()} is used with an external command which is 1614 detected to be GNU \command{tar} or libarchive \command{tar} (aka 1615 \command{bsdtar}), a different command-line is generated to 1616 circumvent line-length limits in the shell. 1617 1618 \item \code{system(*, intern = FALSE)}, \code{system2()} (when not 1619 capturing output), \code{file.edit()} and \code{file.show()} now 1620 issue a warning when the external command cannot be executed. 1621 1622 \item The \dQuote{default} (\code{"lm"} etc) methods of 1623 \code{vcov()} have gained new optional argument \code{complete = 1624 TRUE} which makes the \code{vcov()} methods more consistent with 1625 the \code{coef()} methods in the case of singular designs. The 1626 former (back-compatible) behavior is given by \code{vcov(*, 1627 complete = FALSE)}. 1628 1629 \item \code{coef()} methods (for \code{lm} etc) also gain a 1630 \code{complete = TRUE} optional argument for consistency with 1631 \code{vcov()}. \cr 1632 For \code{"aov"}, both \code{coef()} and \code{vcov()} methods 1633 remain back-compatibly consistent, using the \emph{other} default, 1634 \code{complete = FALSE}. 1635 1636 \item \code{attach(*, pos = 1)} is now an error instead of a 1637 warning. 1638 1639 \item New function \code{getDefaultCluster()} in package 1640 \pkg{parallel} to get the default cluster set via 1641 \code{setDefaultCluster()}. 1642 1643 \item \code{str(x)} for atomic objects \code{x} now treats both 1644 cases of \code{is.vector(x)} similarly, and hence much less often 1645 prints \code{"atomic"}. This is a slight non-back-compatible 1646 change producing typically both more informative and shorter 1647 output. 1648 1649 \item \code{gc()} gets new argument \code{full}. 1650 1651 \item \code{write.dcf()} gets optional argument \code{useBytes}. 1652 1653 \item New, partly experimental \code{packageDate()} which tries to 1654 get a valid \code{"Date"} object from a package \file{DESCRIPTION} 1655 file, thanks to suggestions in \PR{17324}. 1656 1657 \item \code{tools::resaveRdaFiles()} gains a \code{version} 1658 argument, for use when packages should remain compatible with 1659 earlier versions of \R. 1660 1661 \item \code{ar.yw(x)} and hence by default \code{ar(x)} now work 1662 when \code{x} has \code{NA}s, mostly thanks to a patch by Pavel 1663 Krivitsky in \PR{17366}. The \code{ar.yw.default()}'s AIC 1664 computations have become more efficient by using 1665 \code{determinant()}. 1666 1667 \item New \code{warnErrList()} utility (from package \pkg{nlme}, 1668 improved). 1669 1670 \item By default the (arbitrary) signs of the loadings from 1671 \code{princomp()} are chosen so the first element is non-negative. 1672 1673 \item If \option{--default-packages} is not used, then 1674 \command{Rscript} now checks the environment variable 1675 \env{R_SCRIPT_DEFAULT_PACKAGES}. If this is set, then it takes 1676 precedence over \env{R_DEFAULT_PACKAGES}. If default packages are 1677 not specified on the command line or by one of these environment 1678 variables, then \command{Rscript} now uses the same default 1679 packages as \command{R}. For now, the previous behavior of not 1680 including \pkg{methods} can be restored by setting the environment 1681 variable \env{R_SCRIPT_LEGACY} to \samp{yes}. 1682 1683 \item When a package is found more than once, the warning from 1684 \code{find.package(*, verbose=TRUE)} lists all library locations. 1685 1686 \item POSIXt objects can now also be rounded or truncated to month 1687 or year. 1688 1689 \item \code{stopifnot()} can be used alternatively via new argument 1690 \code{exprs} which is nicer and useful when testing several 1691 expressions in one call. 1692 1693 \item The environment variable \env{R_MAX_VSIZE} can now be used 1694 to specify the maximal vector heap size. On macOS, unless specified 1695 by this environment variable, the maximal vector heap size is set to 1696 the maximum of 16GB and the available physical memory. This is to 1697 avoid having the \command{R} process killed when macOS over-commits 1698 memory. 1699 1700 \item \code{sum(x)} and \code{sum(x1, x2, .., x<N>)} with many or 1701 long logical or integer vectors no longer overflows (and returns 1702 \code{NA} with a warning), but returns \code{double} numbers in 1703 such cases. 1704 1705 \item Single components of \code{"POSIXlt"} objects can now be 1706 extracted and replaced via \code{[} indexing with 2 indices. 1707 1708 \item S3 method lookup now searches the namespace registry after 1709 the top level environment of the calling environment. 1710 1711 \item Arithmetic sequences created by \code{1:n}, 1712 \code{seq_along}, and the like now use compact internal 1713 representations via the \code{ALTREP} framework. Coercing integer 1714 and numeric vectors to character also now uses the \code{ALTREP} 1715 framework to defer the actual conversion until first use. 1716 1717 \item Finalizers are now run with interrupts suspended. 1718 1719 \item \code{merge()} gains new option \code{no.dups} and by 1720 default suffixes the second of two duplicated column names, 1721 thanks to a proposal by Scott Ritchie (and Gabe Becker). 1722 1723 \item \code{scale.default(x, center, scale)} now also allows 1724 \code{center} or \code{scale} to be \dQuote{numeric-alike}, i.e., 1725 such that \code{as.numeric(.)} coerces them correctly. This also 1726 eliminates a wrong error message in such cases. 1727 1728 \item \code{par*apply} and \code{par*applyLB} gain an optional 1729 argument \code{chunk.size} which allows to specify the granularity of 1730 scheduling. 1731 1732 \item Some \code{as.data.frame()} methods, notably the 1733 \code{matrix} one, are now more careful in not accepting 1734 duplicated or \code{NA} row names, and by default produce unique 1735 non-NA row names. This is based on new function 1736 \code{.rowNamesDF(x, make.names = *) <- rNms} where the logical 1737 argument \code{make.names} allows to specify \emph{how} invalid 1738 row names \code{rNms} are handled. \code{.rowNamesDF()} is a 1739 \dQuote{workaround} compatible default. 1740 1741 \item R has new serialization format (version 3) which supports 1742 custom serialization of \code{ALTREP} framework objects. These 1743 objects can still be serialized in format 2, but less efficiently. 1744 Serialization format 3 also records the current native encoding of 1745 unflagged strings and converts them when de-serialized in R 1746 running under different native encoding. Format 3 comes with new 1747 serialization magic numbers (RDA3, RDB3, RDX3). Format 3 can be 1748 selected by \code{version = 3} in \code{save()}, 1749 \code{serialize()} and \code{saveRDS()}, but format 2 remains the 1750 default for all serialization and saving of the workspace. 1751 Serialized data in format 3 cannot be read by versions of \R prior 1752 to version 3.5.0. 1753 1754 \item The \code{"Date"} and \dQuote{date-time} classes 1755 \code{"POSIXlt"} and \code{"POSIXct"} now have a working 1756 \code{length<-()} method, as wished in \PR{17387}. 1757 1758 \item \code{optim(*, control = list(warn.1d.NelderMead = FALSE))} 1759 allows to turn off the warning when applying the default 1760 \code{"Nelder-Mead"} method to 1-dimensional problems. 1761 1762 \item \code{matplot(.., panel.first = .)} etc now work, as 1763 \code{log} becomes explicit argument and \code{...} is passed to 1764 \code{plot()} unevaluated, as suggested by Sebastian Meyer in \PR{17386}. 1765 1766 \item Interrupts can be suspended while evaluating an expression 1767 using \code{suspendInterrupts}. Subexpression can be evaluated 1768 with interrupts enabled using \code{allowInterrupts}. These 1769 functions can be used to make sure cleanup handlers cannot be 1770 interrupted. 1771 1772 \item \R 3.5.0 includes a framework that allows packages to 1773 provide alternate representations of basic \R objects 1774 (\code{ALTREP}). The framework is still experimental and may 1775 undergo changes in future \R releases as more experience is 1776 gained. For now, documentation is provided in 1777 \url{https://svn.r-project.org/R/branches/ALTREP/ALTREP.html}. 1778 } 1779 } 1780 1781 \subsection{UTILITIES}{ 1782 \itemize{ 1783 \item \code{install.packages()} for source packages now has the 1784 possibility to set a \sQuote{timeout} (elapsed-time limit). For 1785 serial installs this uses the \code{timeout} argument of 1786 \code{system2()}: for parallel installs it requires the 1787 \command{timeout} utility command from GNU \pkg{coreutils}. 1788 1789 \item It is now possible to set \sQuote{timeouts} (elapsed-time 1790 limits) for most parts of \command{R CMD check} \emph{via} 1791 environment variables documented in the \sQuote{R Internals} 1792 manual. 1793 1794 \item The \sQuote{BioC extra} repository which was dropped from 1795 Bioconductor 3.6 and later has been removed from 1796 \code{setRepositories()}. This changes the mapping for 6--8 used 1797 by \code{setRepositories(ind=)}. 1798 1799 \item \command{R CMD check} now also applies the settings of 1800 environment variables \env{_R_CHECK_SUGGESTS_ONLY_} and 1801 \env{_R_CHECK_DEPENDS_ONLY_} to the re-building of vignettes. 1802 1803 \item \command{R CMD check} with environment variable 1804 \env{_R_CHECK_DEPENDS_ONLY_} set to a true value makes 1805 test-suite-management packages available and (for the time being) 1806 works around a common omission of \CRANpkg{rmarkdown} from the 1807 \samp{VignetteBuilder} field. 1808 } 1809 } 1810 1811 \subsection{INSTALLATION on a UNIX-ALIKE}{ 1812 \itemize{ 1813 \item Support for a system Java on macOS has been 1814 removed --- install a fairly recent Oracle Java (see \sQuote{R 1815 Installation and Administration} §C.3.2). 1816 1817 \item \command{configure} works harder to set additional flags in 1818 \samp{SAFE_FFLAGS} only where necessary, and to use flags which 1819 have little or no effect on performance. 1820 1821 In rare circumstances it may be necessary to override the 1822 setting of \samp{SAFE_FFLAGS}. 1823 1824 \item C99 functions \code{expm1}, \code{hypot}, \code{log1p} and 1825 \code{nearbyint} are now required. 1826 1827 \item \command{configure} sets a \option{-std} flag for the C++ 1828 compiler for all supported C++ standards (e.g., \option{-std=gnu++11} 1829 for the C++11 compiler). Previously this was not done in a few 1830 cases where the default standard passed the tests made 1831 (e.g.\sspace\command{clang 6.0.0} for C++11). 1832 } 1833 } 1834 1835 \subsection{C-LEVEL FACILITIES}{ 1836 \itemize{ 1837 \item \sQuote{Writing R Extensions} documents macros 1838 \code{MAYBE_REFERENCED}, \code{MAYBE_SHARED} and 1839 \code{MARK_NOT_MUTABLE} that should be used by package \code{C} 1840 code instead \code{NAMED} or \code{SET_NAMED}. 1841 1842 \item The object header layout has been changed to support merging 1843 the \code{ALTREP} branch. This requires re-installing packages 1844 that use compiled code. 1845 1846 \item \sQuote{Writing R Extensions} now documents the 1847 \code{R_tryCatch}, \code{R_tryCatchError}, and 1848 \code{R_UnwindProtect} functions. 1849 1850 \item \code{NAMEDMAX} has been raised to 3 to allow protection of 1851 intermediate results from (usually ill-advised) assignments in 1852 arguments to \code{BUILTIN} functions. Package \code{C} code using 1853 \code{SET_NAMED} may need to be revised. 1854 } 1855 } 1856 1857 \subsection{DEPRECATED AND DEFUNCT}{ 1858 \itemize{ 1859 \item \code{Sys.timezone(location = FALSE)} is defunct, and is 1860 ignored (with a warning). 1861 1862 \item \code{methods:::bind_activation()} is defunct now; it 1863 typically has been unneeded for years. 1864 1865 The undocumented \sQuote{hidden} objects \code{.__H__.cbind} and 1866 \code{.__H__.rbind} in package \pkg{base} are deprecated (in 1867 favour of \code{cbind} and \code{rbind}). 1868 1869 \item The declaration of \code{pythag()} in \file{Rmath.h} has 1870 been removed --- the entry point has not been provided since \R 1871 2.14.0. 1872 } 1873 } 1874 1875 \subsection{BUG FIXES}{ 1876 \itemize{ 1877 \item \code{printCoefmat()} now also works without column names. 1878 1879 \item The S4 methods on \code{Ops()} for the \code{"structure"} class no 1880 longer cause infinite recursion when the structure is not an S4 object. 1881 1882 \item \code{nlm(f, ..)} for the case where \code{f()} has a 1883 \code{"hessian"} attribute now computes 1884 \eqn{LL' = H + \mu I}{LL' = H + µI} correctly. (\PR{17249}). 1885 1886 \item An S4 method that \dQuote{rematches} to its generic and 1887 overrides the default value of a generic formal argument to 1888 \code{NULL} no longer drops the argument from its formals. 1889 1890 \item \code{Rscript} can now accept more than one argument given on 1891 the \samp{#!} line of a script. Previously, one could only pass a 1892 single argument on the \samp{#!} line in Linux. 1893 1894 \item Connections are now written correctly with encoding 1895 \code{"UTF-16LE"}. (\PR{16737}). 1896 1897 \item Evaluation of \code{..0} now signals an error. When 1898 \code{..1} is used and \code{...} is empty, the error message is 1899 more appropriate. 1900 1901 \item (Windows mainly.) Unicode code points which require 1902 surrogate pairs in UTF-16 are now handled. All systems should 1903 properly handle surrogate pairs, even those systems that do not 1904 need to make use of them. (\PR{16098}) 1905 1906 \item \code{stopifnot(e, e2, ...)} now evaluates the 1907 expressions sequentially and in case of an error or warning shows 1908 the relevant expression instead of the full \code{stopifnot(..)} 1909 call. 1910 1911 \item \code{path.expand()} on Windows now accepts paths specified as 1912 UTF-8-encoded character strings even if not representable in the 1913 current locale. (\PR{17120}) 1914 1915 \item \code{line(x, y)} now correctly computes the medians of the 1916 left and right group's x-values and in all cases reproduces 1917 straight lines. 1918 1919 \item Extending S4 classes with slots corresponding to special 1920 attributes like \code{dim} and \code{dimnames} now works. 1921 1922 \item Fix for \code{legend()} when \code{fill} has multiple values 1923 the first of which is \code{NA} (all colours used to default to 1924 \code{par(fg)}). (\PR{17288}) 1925 1926 \item \code{installed.packages()} did not remove the cached value 1927 for a library tree that had been emptied (but would not use the 1928 old value, just waste time checking it). 1929 1930 \item The documentation for \code{installed.packages(noCache = TRUE)} 1931 incorrectly claimed it would refresh the cache. 1932 1933 \item \code{aggregate(<data.frame>)} no longer uses spurious names 1934 in some cases. (\PR{17283}) 1935 1936 \item \code{object.size()} now also works for long vectors. 1937 1938 \item \code{packageDescription()} tries harder to solve 1939 re-encoding issues, notably seen in some Windows locales. This 1940 fixes the \code{citation()} issue in \PR{17291}. 1941 1942 \item \code{poly(<matrix>, 3)} now works, thanks to prompting by 1943 Marc Schwartz. 1944 1945 \item \code{readLines()} no longer segfaults on very large files 1946 with embedded \code{'\0'} (aka \sQuote{nul}) characters. 1947 (\PR{17311}) 1948 1949 \item \code{ns()} (package \pkg{splines}) now also works for a 1950 single observation. \code{interpSpline()} gives a more friendly 1951 error message when the number of points is less than four. 1952 1953 \item \code{dist(x, method = "canberra")} now uses the correct 1954 definition; the result may only differ when \code{x} contains 1955 values of differing signs, e.g.\sspace{}not for 0-1 data. 1956 1957 \item \code{methods:::cbind()} and \code{methods:::rbind()} avoid 1958 deep recursion, thanks to Suharto Anggono via \PR{17300}. 1959 1960 \item Arithmetic with zero-column data frames now works more 1961 consistently; issue raised by Bill Dunlap. 1962 1963 Arithmetic with data frames gives a data frame for \code{^} (which 1964 previously gave a numeric matrix). 1965 1966 \item \code{pretty(x, n)} for large \code{n} or large 1967 \code{diff(range(x))} now works better (though 1968 it was never meant for large \code{n}); internally it uses the 1969 same rounding fuzz (1e-10) as \code{seq.default()} --- as it did up 1970 to 2010-02-03 when both were 1e-7. 1971 1972 \item Internal C-level \code{R_check_class_and_super()} and hence 1973 \code{R_check_class_etc()} now also consider non-direct super 1974 classes and hence return a match in more cases. This e.g., fixes 1975 behaviour of derived classes in package \CRANpkg{Matrix}. 1976 1977 \item Reverted unintended change in behavior of \code{return} 1978 calls in \code{on.exit} expressions introduced by stack unwinding 1979 changes in \R 3.3.0. 1980 1981 \item Attributes on symbols are now detected and prevented; attempt 1982 to add an attribute to a symbol results in an error. 1983 1984 \item \code{fisher.test(*, workspace = <n>)} now may also increase 1985 the internal stack size which allows larger problem to be solved, 1986 fixing \PR{1662}. 1987 1988 \item The \pkg{methods} package no longer directly copies slots 1989 (attributes) into a prototype that is of an \dQuote{abnormal} 1990 (reference) type, like a symbol. 1991 1992 \item The \pkg{methods} package no longer attempts to call 1993 \code{length<-()} on \code{NULL} (during the bootstrap process). 1994 1995 \item The \pkg{methods} package correctly shows methods when there 1996 are multiple methods with the same signature for the same generic 1997 (still not fully supported, but at least the user can see them). 1998 1999 \item \code{sys.on.exit()} is now always evaluated in the right 2000 frame. (From Lionel Henry.) 2001 2002 \item \code{seq.POSIXt(*, by = "<n> DSTdays")} now should work 2003 correctly in all cases and is faster. (\PR{17342}) 2004 2005 \item \code{.C()} when returning a logical vector now always maps 2006 values other than FALSE and NA to TRUE (as documented). 2007 2008 \item Subassignment with zero length vectors now coerces as 2009 documented (\PR{17344}).\cr 2010 Further, \code{x <- numeric(); x[1] <- character()} now signals 2011 an error \sQuote{\verb{replacement has length zero}} (or a 2012 translation of that) instead of doing nothing. 2013 2014 \item (Package \pkg{parallel}.) \code{mclapply()}, \code{pvec()} 2015 and \code{mcparallel()} (when \code{mccollect()} is used to 2016 collect results) no longer leave zombie processes behind. 2017 2018 \item \code{R CMD INSTALL <pkg>} now produces the intended error 2019 message when, e.g., the \code{LazyData} field is invalid. 2020 2021 \item \code{as.matrix(dd)} now works when the data frame \code{dd} 2022 contains a column which is a data frame or matrix, including a 2023 0-column matrix/d.f. . 2024 2025 \item \code{mclapply(X, mc.cores)} now follows its documentation 2026 and calls \code{lapply()} in case \code{mc.cores = 1} also in the 2027 case \code{mc.preschedule} is false. (\PR{17373}) 2028 2029 \item \code{aggregate(<data.frame>, drop=FALSE)} no longer calls 2030 the function on <empty> parts but sets corresponding results to 2031 \code{NA}. (Thanks to Suharto Anggono's patches in \PR{17280}). 2032 2033 \item The \code{duplicated()} method for data frames is now based 2034 on the \code{list} method (instead of string coercion). Consequently 2035 \code{unique()} is better distinguishing data frame rows, fixing 2036 \PR{17369} and \PR{17381}. The methods for matrices and arrays 2037 are changed accordingly. 2038 2039 \item Calling \code{names()} on an S4 object derived from 2040 \code{"environment"} behaves (by default) like calling 2041 \code{names()} on an ordinary environment. 2042 2043 \item \code{read.table()} with a non-default separator now 2044 supports quotes following a non-whitespace character, matching the 2045 behavior of \code{scan()}. 2046 2047 \item \code{parLapplyLB} and \code{parSapplyLB} have been fixed to do 2048 load balancing (dynamic scheduling). This also means that results of 2049 computations depending on random number generators will now really be 2050 non-reproducible, as documented. 2051 2052 \item Indexing a list using dollar and empty string (\code{l$""}) 2053 returns NULL. 2054 2055 \item Using \code{ \\usage\{ data(<name>, package="<pkg>") \} } 2056 no longer produces \command{R CMD check} warnings. 2057 2058 \item \code{match.arg()} more carefully chooses the environment 2059 for constructing default \code{choices}, fixing \PR{17401} as 2060 proposed by Duncan Murdoch. 2061 2062 \item Deparsing of consecutive \code{!} calls is now consistent 2063 with deparsing unary \code{-} and \code{+} calls and creates code 2064 that can be reparsed exactly; thanks to a patch by Lionel Henry in 2065 \PR{17397}. (As a side effect, this uses fewer parentheses in 2066 some other deparsing involving \code{!} calls.) 2067 } 2068 } 2069} 2070 2071\section{\Rlogo CHANGES IN R 3.4.4}{ 2072 2073 \subsection{NEW FEATURES}{ 2074 \itemize{ 2075 \item \code{Sys.timezone()} tries more heuristics on Unix-alikes and so 2076 is more likely to succeed (especially on Linux). For the slowest 2077 method, a warning is given recommending that \env{TZ} is set to 2078 avoid the search. 2079 2080 \item The version of LAPACK included in the sources has been 2081 updated to 3.8.0 (for the routines used by \R, a very minor bug-fix 2082 change). 2083 2084 \item \code{parallel::detectCores(logical = FALSE)} is ignored on 2085 Linux systems, since the information is not available with 2086 virtualized OSes. 2087 } 2088 } 2089 2090 \subsection{INSTALLATION on a UNIX-ALIKE}{ 2091 \itemize{ 2092 \item \command{configure} will use \command{pkg-config} to find the 2093 flags to link to \code{jpeg} if available (as it should be for the 2094 recently-released \code{jpeg-9c} and \code{libjpeg-turbo}). (This 2095 amends the code added in \R 3.3.0 as the module name in 2096 \code{jpeg-9c} is not what that tested for.) 2097 } 2098 } 2099 2100 \subsection{DEPRECATED AND DEFUNCT}{ 2101 \itemize{ 2102 \item \code{Sys.timezone(location = FALSE)} (which was a stop-gap 2103 measure for Windows long ago) is deprecated. It no longer returns 2104 the value of environment variable \env{TZ} (usually a location). 2105 2106 \item Legacy support of \command{make} macros such as \samp{CXX1X} 2107 is formally deprecated: use the \samp{CXX11} forms instead. 2108 } 2109 } 2110 2111 \subsection{BUG FIXES}{ 2112 \itemize{ 2113 \item \code{power.prop.test()} now warns when it cannot solve the 2114 problem, typically because of impossible constraints. (\PR{17345}) 2115 2116 \item \code{removeSource()} no longer erroneously removes 2117 \code{NULL} in certain cases, thanks to Dénes Tóth. 2118 2119 \item \code{nls(`NO [mol/l]` ~ f(t))} and \code{nls(y ~ a)} now 2120 work. (Partly from \PR{17367}) 2121 2122 \item \command{R CMD build} checks for GNU \command{cp} rather 2123 than assuming Linux has it. (\PR{17370} says \sQuote{Alpine 2124 Linux} does not.) 2125 2126 \item Non-UTF-8 multibyte character handling fixed more 2127 permanently (\PR{16732}). 2128 2129 \item \code{sum(<large ints>, <stuff>)} is more consistent. 2130 (\PR{17372}) 2131 2132 \item \code{rf()} and \code{rbeta()} now also work correctly when 2133 \code{ncp} is not scalar, notably when (partly) \code{NA}. 2134 (\PR{17375}) 2135 2136 \item \code{is.na(NULL)} no longer warns. (\PR{16107}) 2137 2138 \item \command{R CMD INSTALL} now correctly sets C++ compiler flags 2139 when all source files are in sub-directories of \file{src}. 2140 } 2141 } 2142} 2143 2144\section{\Rlogo CHANGES IN R 3.4.3}{ 2145 2146 \subsection{INSTALLATION on a UNIX-ALIKE}{ 2147 \itemize{ 2148 \item A workaround has been added for the changes in location of 2149 time-zone files in macOS 10.13 \sQuote{High Sierra} and 2150 again in 10.13.1, so the default time zone is deduced 2151 correctly from the system setting when \R is configured with 2152 \option{--with-internal-tzcode} (the default on macOS). 2153 2154 \item \command{R CMD javareconf} has been updated to recognize the 2155 use of a Java 9 SDK on macOS. 2156 } 2157 } 2158 2159 \subsection{BUG FIXES}{ 2160 \itemize{ 2161 \item \code{raw(0) & raw(0)} and \code{raw(0) | raw(0)} 2162 again return \code{raw(0)} (rather than \code{logical(0)}). 2163 2164 \item \code{intToUtf8()} converts integers corresponding to 2165 surrogate code points to \code{NA} rather than invalid UTF-8, as 2166 well as values larger than the current Unicode maximum of 2167 \code{0x10FFFF}. (This aligns with the current RFC3629.) 2168 2169 \item Fix calling of methods on S4 generics that dispatch on 2170 \code{\dots} when the call contains \code{\dots}. 2171 2172 \item Following Unicode \sQuote{Corrigendum 9}, the UTF-8 2173 representations of U+FFFE and U+FFFF are now regarded as valid by 2174 \code{utf8ToInt()}. 2175 2176 \item \code{range(c(TRUE, NA), finite = TRUE)} and similar no longer 2177 return \code{NA}. (Reported by Lukas Stadler.) 2178 2179 \item The self starting function \code{attr(SSlogis, "initial")} 2180 now also works when the y values have exact minimum zero and is 2181 slightly changed in general, behaving symmetrically in the y range. 2182 2183 \item The printing of named raw vectors is now formatted nicely as 2184 for other such atomic vectors, thanks to Lukas Stadler. 2185 } 2186 } 2187} 2188 2189\section{\Rlogo CHANGES IN R 3.4.2}{ 2190 2191 \subsection{NEW FEATURES}{ 2192 \itemize{ 2193 \item Setting the \code{LC_ALL} category in \code{Sys.setlocale()} 2194 invalidates any cached locale-specific day/month names and the 2195 AM/PM indicator for \code{strptime()} (as setting \code{LC_TIME} 2196 has since \R 3.1.0). 2197 2198 \item The version of LAPACK included in the sources has been 2199 updated to 3.7.1, a bug-fix release. 2200 2201 \item The default for \code{tools::write_PACKAGES(rds_compress=)} 2202 has been changed to \code{"xz"} to match the compression used by 2203 \acronym{CRAN}. 2204 2205 \item \code{c()} and \code{unlist()} are now more efficient in 2206 constructing the \code{names(.)} of their return value, thanks to 2207 a proposal by Suharto Anggono. (\PR{17284}) 2208 } 2209 } 2210 2211 \subsection{UTILITIES}{ 2212 \itemize{ 2213 \item \command{R CMD check} checks for and \command{R CMD build} 2214 corrects CRLF line endings in shell scripts \command{configure} 2215 and \command{cleanup} (even on Windows). 2216 } 2217 } 2218 2219 \subsection{INSTALLATION on a UNIX-ALIKE}{ 2220 \itemize{ 2221 \item The order of selection of OpenMP flags has been changed: 2222 Oracle Developer Studio 12.5 accepts \option{-fopenmp} and 2223 \option{-xopenmp} but only the latter enables OpenMP so it is now 2224 tried first. 2225 } 2226 } 2227 2228 \subsection{BUG FIXES}{ 2229 \itemize{ 2230 \item \code{within(List, rm(x1, x2))} works correctly again, 2231 including when \code{List[["x2"]]} is \code{NULL}. 2232 2233 \item \code{regexec(pattern, text, *)} now applies 2234 \code{as.character(.)} to its first two arguments, as documented. 2235 2236 \item \code{write.table()} and related functions, 2237 \code{writeLines()}, and perhaps other functions writing text to 2238 connections did not signal errors when the writes failed, 2239 e.g.\sspace{}due to a disk being full. Errors will now be 2240 signalled if detected during the write, warnings if detected when 2241 the connection is closed. (\PR{17243}) 2242 2243 \item \code{rt()} assumed the \code{ncp} parameter was a scalar. (\PR{17306}) 2244 2245 \item \code{menu(choices)} with more than 10 choices which easily 2246 fit into one \code{getOption("width")}-line no longer erroneously 2247 repeats choices. (\PR{17312}) 2248 2249 \item \code{length()<-} on a pairlist succeeds. 2250 (\url{https://stat.ethz.ch/pipermail/r-devel/2017-July/074680.html}) 2251 2252 \item Language objects such as \code{quote(("\n"))} or \R 2253 functions are correctly printed again, where \R 3.4.1 accidentally 2254 duplicated the backslashes. 2255 2256 \item Construction of \code{names()} for very large objects in 2257 \code{c()} and \code{unlist()} now works, thanks to Suharto 2258 Anggono's patch proposals in \PR{17292}. 2259 2260 \item Resource leaks (and similar) reported by Steve Grubb fixed. 2261 (\PR{17314}, \PR{17316}, \PR{17317}, \PR{17318}, \PR{17319}, \PR{17320}) 2262 2263 \item \code{model.matrix(~1, mf)} now gets the row names from 2264 \code{mf} also when they differ from \code{1:nrow(mf)}, fixing 2265 \PR{14992} thanks to the suggestion by Sebastian Meyer. 2266 2267 \item \code{sigma(fm)} now takes the correct denominator degrees 2268 of freedom for a fitted model with \code{NA} coefficients. (\PR{17313}) 2269 2270 \item \code{hist(x, "FD")} no longer \dQuote{dies} with a somewhat 2271 cryptic error message when \code{x} has extreme outliers or 2272 \code{IQR()} zero: \code{nclass.FD(x)} tries harder to find a 2273 robust bin width \eqn{h} in the latter case, and 2274 \code{hist.default(*, breaks)} now checks and corrects a too large 2275 \code{breaks} number. (\PR{17274}) 2276 2277 \item \code{callNextMethod()} works for \code{\dots} methods. 2278 2279 \item \code{qr.coef(qd, y)} now has correct names also when 2280 \code{qd} is a complex QR or stems from \code{qr(*, LAPACK=TRUE)}. 2281 2282 \item Setting \code{options(device = *)} to an invalid function no 2283 longer segfaults when plotting is initiated. (\PR{15883}) 2284 2285 \item \code{encodeString(<very large string>)} no longer 2286 segfaults. (\PR{15885}) 2287 2288 \item It is again possible to use \command{configure 2289 --enable-maintainer-mode} without having installed 2290 \command{notangle} (it was required in \R 3.4.[01]). 2291 2292 \item S4 method dispatch on \code{\dots} calls the method by name 2293 instead of \code{.Method} (for consistency with default dispatch), 2294 and only attempts to pass non-missing arguments from the generic. 2295 2296 \item \code{readRDS(textConnection(.))} works again. (\PR{17325}) 2297 2298 \item \code{(1:n)[-n]} no longer segfaults for \code{n <- 2.2e9} 2299 (on a platform with enough RAM). 2300 2301 \item \code{x <- 1:2; tapply(x, list(x, x), function(x) "")[1,2]} 2302 now correctly returns \code{NA}. (\PR{17333}) 2303 2304 \item Running of finalizers after explicit GC request moved from 2305 the \R interface \code{do_gc} to the \code{C} interface 2306 \code{R_gc}. This helps with reclaiming inaccessible connections. 2307 2308 \item \code{help.search(topic)} and \code{??topic} matching topics 2309 in vignettes with multiple file name extensions (e.g., 2310 \file{*.md.rsp} but not \file{*.Rmd}) failed with an error 2311 when using \code{options(help_type = "html")}. 2312 2313 \item The X11 device no longer uses the Xlib backing store (\PR{16497}). 2314 2315 \item \code{array(character(), 1)} now gives (a 1D array with) 2316 \code{NA} as has been documented for a long time as in the other 2317 cases of zero-length array initialization and also compatibly with 2318 \code{matrix(character(), *)}. As mentioned there, this also 2319 fixes \PR{17333}. 2320 2321 \item \code{splineDesign(.., derivs = 4)} no longer segfaults. 2322 2323 \item \code{fisher.test(*, hybrid=TRUE)} now (again) will use the 2324 hybrid method when Cochran's conditions are met, fixing \PR{16654}. 2325 } 2326 } 2327} 2328 2329\section{\Rlogo CHANGES IN R 3.4.1}{ 2330 2331 \subsection{INSTALLATION on a UNIX-ALIKE}{ 2332 \itemize{ 2333 \item The deprecated support for PCRE versions older than 8.20 2334 has been removed. 2335 } 2336 } 2337 2338 \subsection{BUG FIXES}{ 2339 \itemize{ 2340 \item \code{getParseData()} gave incorrect column information when 2341 code contained multi-byte characters. (\PR{17254}) 2342 2343 \item Asking for help using expressions like \code{?stats::cor()} 2344 did not work. (\PR{17250}) 2345 2346 \item \code{readRDS(url(....))} now works. 2347 2348 \item \command{R CMD Sweave} again returns \samp{status = 0} on 2349 successful completion. 2350 2351 \item Vignettes listed in \file{.Rbuildignore} were not being 2352 ignored properly. (\PR{17246}) 2353 2354 \item \code{file.mtime()} no longer returns NA on Windows when the 2355 file or directory is being used by another process. This affected 2356 \code{installed.packages()}, which is now protected against this. 2357 2358 \item \command{R CMD INSTALL} Windows .zip file obeys \code{--lock} 2359 and \code{--pkglock} flags. 2360 2361 \item (Windows only) The \code{choose.files()} function could 2362 return incorrect results when called with \code{multi = FALSE}. 2363 (\PR{17270}) 2364 2365 \item \code{aggregate(<data.frame>, drop = FALSE)} now also works in 2366 case of near-equal numbers in \code{by}. (\PR{16918}) 2367 2368 \item \code{fourfoldplot()} could encounter integer overflow when 2369 calculating the odds ratio. (\PR{17286}) 2370 2371 \item \code{parse()} no longer gives spurious warnings when 2372 extracting srcrefs from a file not encoded in the current locale. 2373 2374 This was seen from \command{R CMD check} with \file{inst/doc/*.R} 2375 files, and \code{check} has some additional protection for such files. 2376 2377 \item \code{print.noquote(x)} now always returns its argument 2378 \code{x} (invisibly). 2379 2380 \item Non-UTF-8 multibyte character sets were not handled properly 2381 in source references. (\PR{16732}) 2382 } 2383 } 2384} 2385 2386\section{\Rlogo CHANGES IN R 3.4.0}{ 2387 2388 \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{ 2389 \itemize{ 2390 \item (Unix-alike) 2391 The default methods for \code{download.file()} and \code{url()} 2392 now choose \code{"libcurl"} except for \samp{file://} 2393 URLs. There will be small changes in the format and wording of 2394 messages, including in rare cases if an issue is a warning or an 2395 error. For example, when HTTP re-direction occurs, some messages 2396 refer to the final URL rather than the specified one. 2397 2398 Those who use proxies should check that their settings are 2399 compatible (see \code{?download.file}: the most commonly used 2400 forms work for both \code{"internal"} and \code{"libcurl"}). 2401 2402 \item \code{table()} has been amended to be more internally 2403 consistent and become back compatible to \R \eqn{\le}{<=} 2.7.2 2404 again. Consequently, \code{table(1:2, exclude = NULL)} no longer 2405 contains a zero count for \code{<NA>}, but \code{useNA = "always"} 2406 continues to do so. 2407 2408 \item \code{summary.default()} no longer rounds, but its print 2409 method does resulting in less extraneous rounding, notably of 2410 numbers in the ten thousands. 2411 2412 \item \code{factor(x, exclude = L)} behaves more rationally when 2413 \code{x} or \code{L} are character vectors. Further, 2414 \code{exclude = <factor>} now behaves as documented for long. 2415 2416 \item Arithmetic, logic (\code{&}, \code{|}) and comparison (aka 2417 \sQuote{relational}, e.g., \code{<}, \code{==}) operations with 2418 arrays now behave consistently, notably for arrays of length zero. 2419 2420 Arithmetic between length-1 arrays and longer non-arrays had 2421 silently dropped the array attributes and recycled. This now 2422 gives a warning and will signal an error in the future, as it has 2423 always for logic and comparison operations in these cases (e.g., 2424 compare \code{matrix(1,1) + 2:3} and \code{matrix(1,1) < 2:3}). 2425 2426 \item The JIT (\sQuote{Just In Time}) byte-code compiler is now 2427 enabled by default at its level 3. This means functions will be 2428 compiled on first or second use and top-level loops will be 2429 compiled and then run. (Thanks to Tomas Kalibera for extensive 2430 work to make this possible.) 2431 2432 For now, the compiler will not compile code containing explicit 2433 calls to \code{browser()}: this is to support single stepping from 2434 the \code{browser()} call. 2435 2436 JIT compilation can be disabled for the rest of the session using 2437 \code{compiler::enableJIT(0)} or by setting environment variable 2438 \env{R_ENABLE_JIT} to \code{0}. 2439 2440 \item \code{xtabs()} works more consistently with \code{NA}s, also 2441 in its result no longer setting them to \code{0}. Further, a new 2442 logical option \code{addNA} allows to count \code{NA}s where 2443 appropriate. Additionally, for the case \code{sparse = TRUE}, the 2444 result's \code{dimnames} are identical to the default case's. 2445 2446 \item Matrix products now consistently bypass BLAS when the inputs 2447 have \code{NaN}/\code{Inf} values. Performance of the check of 2448 inputs has been improved. Performance when BLAS is used is 2449 improved for matrix/vector and vector/matrix multiplication (DGEMV 2450 is now used instead of DGEMM). 2451 2452 One can now choose from alternative matrix product implementations 2453 \emph{via} \code{options(matprod = )}. The \code{"internal"} 2454 implementation is not optimized for speed but consistent in 2455 precision with other summations in R (using \code{long double} 2456 accumulators where available). \code{"blas"} calls BLAS directly 2457 for best speed, but usually with undefined behavior for inputs 2458 with \code{NaN}/\code{Inf}. 2459 } 2460 } 2461 2462 \subsection{NEW FEATURES}{ 2463 \itemize{ 2464 \item User errors such as \code{integrate(f, 0:1, 2)} are now caught. 2465 2466 \item Add \code{signature} argument to \code{debug()}, 2467 \code{debugonce()}, \code{undebug()} and \code{isdebugged()} for 2468 more conveniently debugging S3 and S4 methods. (Based on a patch by 2469 Gabe Becker.) 2470 2471 \item Add \code{utils::debugcall()} and 2472 \code{utils::undebugcall()} for debugging the function that would 2473 be called by evaluating the given expression. When the call is to 2474 an S4 generic or standard S3 generic, \code{debugcall()} debugs the 2475 method that would be dispatched. A number of internal utilities 2476 were added to support this, most notably 2477 \code{utils::isS3stdGeneric()}. (Based on a patch by Gabe Becker.) 2478 2479 \item Add \code{utils::strcapture()}. Given a character vector and 2480 a regular expression containing capture expressions, 2481 \code{strcapture()} will extract the captured tokens into a 2482 tabular data structure, typically a \code{data.frame}. 2483 2484 \item \code{str()} and \code{strOptions()} get a new option 2485 \code{drop.deparse.attr} with improved but \emph{changed} default 2486 behaviour for expressions. For \code{expression} objects 2487 \code{x}, \code{str(x)} now may remove extraneous white space and 2488 truncate long lines. 2489 2490 \item \code{str(<looooooooong_string>)} is no longer very slow; 2491 inspired by Mikko Korpela's proposal in \PR{16527}. 2492 2493 \item \code{str(x)}'s default method is more \dQuote{accurate} and 2494 hence somewhat more generous in displaying character vectors; this 2495 will occasionally change \R outputs (and need changes to some 2496 \file{*.Rout(.save)} files). 2497 \cr %% same \item 2498 For a classed integer vector such as \code{x <- xtabs(~ c(1,9,9,9))}, 2499 \code{str(x)} now shows both the class and \code{"int"}, instead 2500 of only the latter. 2501 2502 \item \code{isSymmetric(m)} is much faster for large asymmetric 2503 matrices \code{m} \emph{via} pre-tests and a new option \code{tol1} 2504 (with which strict back compatibility is possible but not the 2505 default). 2506 2507 \item The result of \code{eigen()} now is of class \code{"eigen"} 2508 in the default case when eigenvectors are computed. 2509 2510 \item Zero-length date and date-time objects (of classes 2511 \code{"POSIX[cl]?t"}) now \code{print()} \dQuote{recognizably}. 2512 2513 \item \code{xy.coords()} and \code{xyz.coords()} get a new 2514 \code{setLab} option. 2515 2516 \item The \code{method} argument of \code{sort.list()}, 2517 \code{order()} and \code{sort.int()} gains an \code{"auto"} option 2518 (the default) which should behave the same as before when 2519 \code{method} was not supplied. 2520 2521 \item \code{stopifnot(E, ..)} now reports differences when 2522 \code{E} is a call to \code{all.equal()} and that is not true. 2523 2524 \item \code{boxplot(<formula>, *)} gain optional arguments 2525 \code{drop}, \code{sep}, and \code{lex.order} to pass to 2526 \code{split.default()} which itself gains an argument 2527 \code{lex.order} to pass to \code{interaction()} for more 2528 flexibility. 2529 2530 \item The \code{plot()} method for \code{ppr()} has enhanced 2531 default labels (\code{xmin} and \code{main}). 2532 2533 \item \code{sample.int()} gains an explicit \code{useHash} option 2534 (with a back compatible default). 2535 2536 \item \code{identical()} gains an \code{ignore.srcref} option 2537 which drops \code{"srcref"} and similar attributes when true (as 2538 by default). 2539 2540 \item \code{diag(x, nrow = n)} now preserves \code{typeof(x)}, also 2541 for logical, integer and raw \code{x} (and as previously for 2542 complex and numeric). 2543 2544 \item \code{smooth.spline()} now allows direct specification of 2545 \code{lambda}, gets a \code{hatvalues()} method and keeps 2546 \code{tol} in the result, and optionally parts of the internal 2547 matrix computations. 2548 2549 \item \code{addNA()} is faster now, e.g.\sspace{}when applied twice. 2550 (Part of \PR{16895}.) 2551 2552 \item New option \code{rstandard(<lm>, type = "predicted")} 2553 provides the \dQuote{PRESS}--related leave-one-out 2554 cross-validation errors for linear models. 2555 2556 \item After seven years of deprecation, duplicated factor levels 2557 now produce a warning when printed and an error in \code{levels<-} 2558 instead of a warning. 2559 2560 \item Invalid factors, e.g., with duplicated levels (invalid but 2561 constructable) now give a warning when printed, \emph{via} new 2562 function \code{.valid.factor()}. 2563 2564 \item \code{sessionInfo()} has been updated for Apple's change in 2565 OS naming as from \sQuote{10.12} (\sQuote{macOS Sierra} \emph{vs} 2566 \sQuote{OS X El Capitan}). 2567 2568 Its \code{toLatex()} method now includes the \code{running} 2569 component. 2570 2571 \item \code{options(interrupt=)} can be used to specify a default 2572 action for user interrupts. For now, if this option is not set 2573 and the \code{error} option is set, then an unhandled user 2574 interrupt invokes the \code{error} option. (This may be dropped in 2575 the future as \code{interrupt} conditions are not \code{error} 2576 conditions.) 2577 2578 \item In most cases user interrupt handlers will be called with a 2579 \code{"resume"} restart available. Handlers can invoke this 2580 restart to resume computation. At the browser prompt the \code{r} 2581 command will invoke a \code{"resume"} restart if one is 2582 available. Some read operations cannot be resumed properly when 2583 interrupted and do not provide a \code{"resume"} restart. 2584 2585 \item Radix sort is now chosen by \code{method = "auto"} for 2586 \code{sort.int()} for double vectors (and hence used for 2587 \code{sort()} for unclassed double vectors), excluding 2588 \sQuote{long} vectors. 2589 2590 \code{sort.int(method = "radix")} no longer rounds double vectors. 2591 2592 \item The \code{default} and \code{data.frame} methods for 2593 \code{stack()} preserve the names of empty elements in the levels 2594 of the \code{ind} column of the return value. Set the new 2595 \code{drop} argument to \code{TRUE} for the previous behavior. 2596 2597 \item Speedup in \code{simplify2array()} and hence \code{sapply()} and 2598 \code{mapply()} (for the case of names and common length > 1), 2599 thanks to Suharto Anggono's \PR{17118}. 2600 2601 \item \code{table(x, exclude = NULL)} now sets 2602 \code{useNA = "ifany"} (instead of \code{"always"}). 2603 Together with the bug fixes for this case, this recovers more 2604 consistent behaviour compatible to older versions of \R. As 2605 a consequence, \code{summary()} for a logical vector no longer 2606 reports (zero) counts for \code{NA} when there are no \code{NA}s. 2607 2608 \item \code{dump.frames()} gets a new option 2609 \code{include.GlobalEnv} which allows to also dump the global 2610 environment, thanks to Andreas Kersting's proposal in \PR{17116}. 2611 2612 \item \code{system.time()} now uses \code{message()} instead of 2613 \code{cat()} when terminated early, such that 2614 \code{suppressMessages()} has an effect; suggested by Ben Bolker. 2615 2616 \item \code{citation()} supports \file{inst/CITATION} files from 2617 package source trees, with \code{lib.loc} pointing to the 2618 directory containing the package. 2619 2620 %% Would need more work (notably in ../src/main/sort.c ) 2621 %% \item New \code{orderL(lst, ....)} for use in \code{do.call()} to 2622 %% avoid the name problem seen in \PR{17119}. 2623 2624 \item \code{try()} gains a new argument \code{outFile} with a 2625 default that can be modified \emph{via} 2626 \code{options(try.outFile = .)}, useful notably for \code{Sweave}. 2627 2628 \item The unexported low-level functions in package \pkg{parallel} 2629 for passing serialized \R objects to and from forked children now 2630 support long vectors on 64-bit platforms. This removes some 2631 limits on higher-level functions such as \code{mclapply()} (but 2632 returning gigabyte results from forked processes \emph{via} 2633 serialization should be avoided if at all possible). 2634 2635 \item Connections now \code{print()} without error even if 2636 invalid, e.g.\sspace{}after having been destroyed. 2637 2638 \item \code{apropos()} and \code{find(simple.words = FALSE)} no 2639 longer match object names starting with \samp{.} which are known 2640 to be internal objects (such as \code{.__S3MethodsTable__.}). 2641 2642 \item Convenience function \code{hasName()} has been added; it 2643 is intended to replace the common idiom \code{!is.null(x$name)} 2644 without the usually unintended partial name matching. 2645 2646 \item \code{strcapture()} no longer fixes column names nor coerces 2647 strings to factors (suggested by Bill Dunlap). 2648 2649 \item \code{strcapture()} returns \code{NA} for non-matching 2650 values in \code{x} (suggested by Bill Dunlap). 2651 2652 \item \code{source()} gets new optional arguments, notably 2653 \code{exprs}; this is made use of in the new utility function 2654 \code{withAutoprint()}. 2655 2656 \item \code{sys.source()} gets a new \code{toplevel.env} argument. 2657 This argument is useful for frameworks running package tests; 2658 contributed by Tomas Kalibera. 2659 2660 \item \code{Sys.setFileTime()} and 2661 \code{file.copy(copy.date = TRUE)} will set timestamps with 2662 fractions of seconds on platforms/filesystems which support this. 2663 2664 \item (Windows only.) \code{file.info()} now returns file 2665 timestamps including fractions of seconds; it has done so on other 2666 platforms since \R 2.14.0. (NB: some filesystems do not 2667 record modification and access timestamps to sub-second 2668 resolution.) 2669 2670 \item The license check enabled by 2671 \code{options(checkPackageLicense = TRUE)} is now done when the 2672 package's namespace is first loaded. 2673 2674 \item \code{ppr()} and \code{supsmu()} get an optional 2675 \code{trace} argument, and \code{ppr(.., sm.method = ..spline)} is 2676 no longer limited to sample size \eqn{n \le 2500}{n <= 2500}. 2677 2678 \item The \code{POSIXct} method for \code{print()} gets optional 2679 \code{tz} and \code{usetz} arguments, thanks to a report from 2680 Jennifer S. Lyon. 2681 2682 \item New function \code{check_packages_in_dir_details()} in 2683 package \pkg{tools} for analyzing package-check log files to 2684 obtain check details. 2685 2686 \item Package \pkg{tools} now exports function 2687 \code{CRAN_package_db()} for obtaining information about current 2688 packages in the \acronym{CRAN} package repository, and several 2689 functions for obtaining the check status of these packages. 2690 2691 \item The (default) Stangle driver \code{Rtangle} allows 2692 \code{annotate} to be a function and gets a new 2693 \code{drop.evalFALSE} option. 2694 2695 \item The default method for \code{quantile(x, prob)} should now 2696 be monotone in \code{prob}, even in border cases, see \PR{16672}. 2697 2698 \item \code{bug.report()} now tries to extract an email address 2699 from a \samp{BugReports} field, and if there is none, from a 2700 \samp{Contacts} field. 2701 2702 \item The \code{format()} and \code{print()} methods for 2703 \code{object.size()} results get new options \code{standard} and 2704 \code{digits}; notably, \code{standard = "IEC"} and 2705 \code{standard = "SI"} allow more standard (but less common) 2706 abbreviations than the default ones, e.g.\sspace{}for kilobytes. 2707 (From contributions by Henrik Bengtsson.) 2708 2709 \item If a reference class has a validity method, 2710 \code{validObject} will be called automatically from the 2711 default initialization method for reference classes. 2712 2713 \item \code{tapply()} gets new option \code{default = NA} 2714 allowing to change the previously hardcoded value. 2715 2716 \item \code{read.dcf()} now consistently interprets any 2717 \sQuote{whitespace} to be stripped to include newlines. 2718 2719 \item The maximum number of DLLs that can be loaded into R 2720 e.g.\sspace{}\emph{via} \code{dyn.load()} can now be increased by 2721 setting the environment variable \code{R_MAX_NUM_DLLS} before 2722 starting R. 2723 2724 \item Assigning to an element of a vector beyond the current 2725 length now over-allocates by a small fraction. The new vector is 2726 marked internally as growable, and the true length of the new 2727 vector is stored in the \code{truelength} field. This makes 2728 building up a vector result by assigning to the next element 2729 beyond the current length more efficient, though pre-allocating is 2730 still preferred. The implementation is subject to change and not 2731 intended to be used in packages at this time. 2732 2733 \item Loading the \pkg{parallel} package namespace no longer sets 2734 or changes the \code{.Random.seed}, even if \env{R_PARALLEL_PORT} 2735 is unset. 2736 2737 NB: This can break reproducibility of output, and did for a 2738 \acronym{CRAN} package. 2739 2740 \item Methods \code{"wget"} and \code{"curl"} for 2741 \code{download.file()} now give an \R error rather than a non-zero 2742 return value when the external command has a non-zero status. 2743 2744 \item Encoding name \code{"utf8"} is mapped to \code{"UTF-8"}. 2745 Many implementations of \code{iconv} accept \code{"utf8"}, but not 2746 GNU \pkg{libiconv} (including the late 2016 version 1.15). 2747 2748 \item \code{sessionInfo()} shows the full paths to the library or 2749 executable files providing the BLAS/LAPACK implementations 2750 currently in use (not available on Windows). 2751 2752 \item The binning algorithm used by bandwidth selectors 2753 \code{bw.ucv()}, \code{bw.bcv()} and \code{bw.SJ()} switches to a 2754 version linear in the input size \code{n} for \code{n > nb/2}. 2755 (The calculations are the same, but for larger \code{n/nb} it is 2756 worth doing the binning in advance.) 2757 2758 \item There is a new option \code{PCRE_study} which controls when 2759 \code{grep(perl = TRUE)} and friends \sQuote{study} the compiled 2760 pattern. Previously this was done for 11 or more input strings: 2761 it now defaults to 10 or more (but most examples need many more 2762 for the difference from studying to be noticeable). 2763 2764 \item \code{grep(perl = TRUE)} and friends can now make use of 2765 PCRE's Just-In-Time mechanism, for PCRE \eqn{\ge}{>=} 8.20 on 2766 platforms where JIT is supported. It is used by default whenever 2767 the \code{pattern} is studied (see the previous item). (Based on 2768 a patch from Mikko Korpela.) 2769 2770 This is controlled by a new option \code{PCRE_use_JIT}. 2771 2772 Note that in general this makes little difference to the speed, 2773 and may take a little longer: its benefits are most evident on 2774 strings of thousands of characters. As a side effect it reduces 2775 the chances of C stack overflow in the PCRE library on very long 2776 strings (millions of characters, but see next item). 2777 2778 Warning: segfaults were seen using PCRE with JIT enabled on 64-bit 2779 Sparc builds. 2780 2781 \item There is a new option \code{PCRE_limit_recursion} for 2782 \code{grep(perl = TRUE)} and friends to set a recursion limit 2783 taking into account \R's estimate of the remaining C stack space 2784 (or 10000 if that is not available). This reduces the chance of C 2785 stack overflow, but because it is conservative may report a 2786 non-match (with a warning) in examples that matched before. By 2787 default it is enabled if any input string has 1000 or more bytes. 2788 (\PR{16757}) 2789 2790 \item \code{getGraphicsEvent()} now works on 2791 \code{X11(type = "cairo")} devices. Thanks to Frederick Eaton (for 2792 reviving an earlier patch). 2793 2794 \item There is a new argument \code{onIdle} for 2795 \code{getGraphicsEvent()}, which allows an R function to be run 2796 whenever there are no pending graphics events. This is currently 2797 only supported on X11 devices. Thanks to Frederick Eaton. 2798 2799 \item The \code{deriv()} and similar functions now can compute 2800 derivatives of \code{log1p()}, \code{sinpi()} and similar 2801 one-argument functions, thanks to a contribution by Jerry Lewis. 2802 2803 \item \code{median()} gains a formal \code{\dots} argument, so 2804 methods with extra arguments can be provided. 2805 2806 \item \code{strwrap()} reduces \code{indent} if it is more than 2807 half \code{width} rather than giving an error. (Suggested by Bill 2808 Dunlap.) 2809 2810 \item When the condition \code{code} in \code{if(.)} or 2811 \code{while(.)} is not of length one, an error instead of a 2812 warning may be triggered by setting an environment variable, see 2813 the help page. 2814 2815 \item Formatting and printing of bibliography entries 2816 (\code{bibentry}) is more flexible and better documented. Apart 2817 from setting \code{options(citation.bibtex.max = 99)} you can also 2818 use \code{print(<citation>, bibtex=TRUE)} (or \code{format(..)}) 2819 to get the BibTeX entries in the case of more than one entry. 2820 This also affects \code{citation()}. 2821 Contributions to enable \code{style = "html+bibtex"} are welcome. 2822 } 2823 } 2824 2825 \subsection{C-LEVEL FACILITIES}{ 2826 \itemize{ 2827 \item Entry points \code{R_MakeExternalPtrFn} and 2828 \code{R_ExternalPtrFn} are now declared in header 2829 \file{Rinternals.h} to facilitate creating and retrieving an \R{} 2830 external pointer from a C function pointer without ISO C warnings 2831 about the conversion of function pointers. 2832 2833 \item There was an exception for the native Solaris C++ compiler 2834 to the dropping (in \R 3.3.0) of legacy C++ headers from headers 2835 such as \file{R.h} and \file{Rmath.h} --- this has now been 2836 removed. That compiler has strict C++98 compliance hence does not 2837 include extensions in its (non-legacy) C++ headers: some 2838 packages will need to request C++11 or replace non-C++98 calls 2839 such as \code{lgamma}: see §1.6.4 of \sQuote{Writing R Extensions}. 2840 2841 Because it is needed by about 70 CRAN packages, headers \file{R.h} 2842 and \file{Rmath.h} still declare \preformatted{use namespace std;} 2843 when included on Solaris. 2844 2845 \item When included from C++, the \R headers now use forms such as 2846 \code{std::FILE} directly rather than including the line \preformatted{using std::FILE;} 2847 C++ code including these headers might be relying on the latter. 2848 2849 \item Headers \file{R_ext/BLAS.h} and \file{R_ext/Lapack.h} have 2850 many improved declarations including \code{const} for 2851 double-precision complex routines. \emph{Inter alia} this avoids 2852 warnings when passing \sQuote{string literal} arguments from C++11 2853 code. 2854 2855 \item Headers for Unix-only facilities \file{R_ext/GetX11Image.h}, 2856 \file{R_ext/QuartzDevice.h} and \file{R_ext/eventloop.h} are no 2857 longer installed on Windows. 2858 2859 \item No-longer-installed headers \file{GraphicsBase.h}, 2860 \file{RGraphics.h}, \file{Rmodules/RX11.h} and 2861 \file{Rmodules/Rlapack.h} which had a LGPL license no longer do so. 2862 2863 \item \code{HAVE_UINTPTR_T} is now defined where appropriate by 2864 \code{Rconfig.h} so that it can be included before 2865 \code{Rinterface.h} when \code{CSTACK_DEFNS} is defined and a C 2866 compiler (not C++) is in use. \code{Rinterface.h} now includes C 2867 header \file{stdint.h} or C++11 header \file{cstdint} where 2868 needed. 2869 2870 \item Package \pkg{tools} has a new function 2871 \code{package_native_routine_registration_skeleton()} to assist 2872 adding native-symbol registration to a package. See its help and 2873 §5.4.1 of \sQuote{Writing R Extensions} for how to use it. (At 2874 the time it was added it successfully automated adding 2875 registration to over 90\% of \acronym{CRAN} packages which lacked 2876 it. Many of the failures were newly-detected bugs in the 2877 packages, e.g.\sspace50 packages called entry points with varying 2878 numbers of arguments and 65 packages called entry points not in 2879 the package.) 2880 %% 235 fail out of 2460, with 15 others working with 2881 %% character_only = FALSE. 2882 } 2883 } 2884 2885 \subsection{INSTALLATION on a UNIX-ALIKE}{ 2886 \itemize{ 2887 \item \code{readline} headers (and not just the library) are 2888 required unless configuring with \option{--with-readline=no}. 2889 2890 \item \command{configure} now adds a compiler switch for C++11 2891 code, even if the compiler supports C++11 by default. (This 2892 ensures that \command{g++} 6.x uses C++11 mode and not its default 2893 mode of C++14 with \sQuote{GNU extensions}.) 2894 2895 The tests for C++11 compliance are now much more comprehensive. 2896 For gcc < 4.8, the tests from R 3.3.0 are used in order to maintain 2897 the same behaviour on Linux distributions with long-term support. 2898 2899 \item An alternative compiler for C++11 is now specified with 2900 \samp{CXX11}, not \samp{CXX1X}. Likewise C++11 flags are specified 2901 with \samp{CXX11FLAGS} and the standard (e.g., \samp{-std=gnu++11}) 2902 is specified with \samp{CXX11STD}. 2903 2904 \item \command{configure} now tests for a C++14-compliant compiler 2905 by testing some basic features. This by default tries flags for 2906 the compiler specified by \samp{CXX11}, but an alternative compiler, 2907 options and standard can be specified by variables \samp{CXX14}, 2908 \samp{CXX14FLAGS} and \samp{CXX14STD} (e.g., \option{-std=gnu++14}). 2909 2910 \item There is a new macro \code{CXXSTD} to help specify the 2911 standard for C++ code, e.g.\sspace{}\option{-std=c++98}. This 2912 makes it easier to work with compilers which default to a later 2913 standard: for example, with \code{CXX=g++6 CXXSTD=-std=c++98} 2914 \command{configure} will select commands for \command{g++} 6.x 2915 which conform to C++11 and C++14 where specified but otherwise use 2916 C++98. 2917 2918 \item Support for the defunct IRIX and OSF/1 OSes and Alpha CPU 2919 has been removed. 2920 2921 \item \command{configure} checks that the compiler specified by 2922 \samp{$CXX $CXXFLAGS} is able to compile C++ code. 2923 2924 \item \command{configure} checks for the required header 2925 \file{sys/select.h} (or \file{sys/time.h} on legacy systems) and 2926 system call \code{select} and aborts if they are not found. 2927 2928 \item If available, the POSIX 2008 system call \code{utimensat} 2929 will be used by \code{Sys.setFileTime()} and 2930 \code{file.copy(copy.date = TRUE)}. This may result in slightly 2931 more accurate file times. (It is available on Linux and FreeBSD 2932 but not macOS.) 2933 %% My Solaris 10 system does not have it, but Oracle's online help does 2934 2935 \item The minimum version requirement for \code{libcurl} has been 2936 reduced to 7.22.0, although at least 7.28.0 is preferred and 2937 earlier versions are little tested. (This is to support Debian 7 2938 \sQuote{Wheezy} LTS and Ubuntu \sQuote{Precise} 12.04 LTS, 2939 although the latter is close to end-of-life.) 2940 %% Debian Wheezy LTS is supported until 2018-05-31 2941 2942 \item \command{configure} tests for a C++17-compliant compiler. 2943 The tests are experimental and subject to change in the future. 2944 } 2945 } 2946 2947 \subsection{INCLUDED SOFTWARE}{ 2948 \itemize{ 2949 \item (Windows only) Tcl/Tk version 8.6.4 is now included in the 2950 binary builds. The \file{tcltk*.chm} help file is no longer 2951 included; please consult the online help at 2952 \url{http://www.tcl.tk/man/} instead. 2953 2954 \item The version of LAPACK included in the sources has been 2955 updated to 3.7.0: no new routines have been added to \R{}. 2956 } 2957 } 2958 2959 \subsection{PACKAGE INSTALLATION}{ 2960 \itemize{ 2961 \item There is support for compiling C++14 or C++17 code in 2962 packages on suitable platforms: see \sQuote{Writing R Extensions} 2963 for how to request this. 2964 2965 \item The order of flags when \samp{LinkingTo} other packages has 2966 been changed so their include directories come earlier, before 2967 those specified in \code{CPPFLAGS}. This will only have an effect 2968 if non-system include directories are included with \option{-I} 2969 flags in \code{CPPFLAGS} (and so not the default 2970 \code{-I/usr/local/include} which is treated as a system include 2971 directory on most platforms). 2972 %% This ensures that BH's 'boost' directory gets precedent over 2973 %% any Boost headers in, say, /opt/csw/include . 2974 2975 \item Packages which register native routines for \code{.C} or 2976 \code{.Fortran} need to be re-installed for this version (unless 2977 installed with R-devel SVN revision r72375 or later). 2978 2979 \item Make variables with names containing \code{CXX1X} are 2980 deprecated in favour of those using \code{CXX11}, but for the time 2981 being are still made available \emph{via} file 2982 \file{etc/Makeconf}. Packages using them should be converted to 2983 the new forms and made dependent on \samp{R (>= 3.4.0)}. 2984 } 2985 } 2986 2987 \subsection{UTILITIES}{ 2988 \itemize{ 2989 \item Running \command{R CMD check --as-cran} with 2990 \env{_R_CHECK_CRAN_INCOMING_REMOTE_} false now skips tests that 2991 require remote access. The remaining (local) tests typically 2992 run quickly compared to the remote tests. 2993 2994 \item \command{R CMD build} will now give priority to vignettes 2995 produced from files in the \file{vignettes} directory over those 2996 in the \file{inst/doc} directory, with a warning that the latter 2997 are being ignored. 2998 2999 \item \command{R CMD config} gains a \option{--all} option for 3000 printing names and values of all basic configure variables. 3001 3002 It now knows about all the variables used for the C++98, C++11 and 3003 C++14 standards. 3004 3005 \item \command{R CMD check} now checks that output files in 3006 \file{inst/doc} are newer than the source files in \file{vignettes}. 3007 3008 \item For consistency with other package subdirectories, files 3009 named \file{*.r} in the \file{tests} directory are now recognized 3010 as tests by \command{R CMD check}. (Wish of \PR{17143}.) 3011 3012 \item \command{R CMD build} and \command{R CMD check} now use the 3013 \emph{union} of \env{R_LIBS} and \code{.libPaths()}. They may not 3014 be equivalent, e.g., when the latter is determined by 3015 \env{R_PROFILE}. 3016 3017 \item \command{R CMD build} now preserves dates when it copies files 3018 in preparing the tarball. (Previously on Windows it changed the 3019 dates on all files; on Unix, it changed some dates when installing 3020 vignettes.) 3021 3022 \item The new option \command{R CMD check --no-stop-on-test-error} 3023 allows running the remaining tests (under \file{tests/}) even if 3024 one gave an error. 3025 3026 \item Check customization \emph{via} environment variables to 3027 detect side effects of \code{.Call()} and \code{.External()} calls 3028 which alter their arguments is described in §8 of the \sQuote{R 3029 Internals} manual. 3030 3031 \item \command{R CMD check} now checks any \samp{BugReports} field 3032 to be non-empty and a suitable single URL. 3033 3034 \item \command{R CMD check --as-cran} now NOTEs if the package 3035 does not register its native routines or does not declare its 3036 intentions on (native) symbol search. (This will become a WARNING 3037 in due course.) 3038 } 3039 } 3040 3041 \subsection{DEPRECATED AND DEFUNCT}{ 3042 \itemize{ 3043 \item (Windows only) Function \code{setInternet2()} is defunct. 3044 3045 \item Installation support for \code{readline} emulations based on 3046 \code{editline} (aka \code{libedit}) is deprecated. 3047 3048 \item Use of the C/C++ macro \samp{NO_C_HEADERS} is defunct and 3049 silently ignored. 3050 3051 \item \code{unix.time()}, a traditional synonym for 3052 \code{system.time()}, has been deprecated. 3053 3054 \item \code{structure(NULL, ..)} is now deprecated as you cannot 3055 set attributes on \code{\link{NULL}}. 3056 3057 \item Header \file{Rconfig.h} no longer defines 3058 \samp{SUPPORT_OPENMP}; instead use \samp{_OPENMP} (as documented 3059 for a long time). 3060 3061 \item (C-level Native routine registration.) The deprecated 3062 \code{styles} member of the \code{R_CMethodDef} and 3063 \code{R_FortranMethodDef} structures has been removed. 3064 Packages using these will need to be re-installed for \R 3.4.0. 3065 3066 \item The deprecated support for PCRE versions older than 8.20 3067 will be removed in \R 3.4.1. (Versions 8.20--8.31 will still be 3068 accepted but remain deprecated.) 3069 } 3070 } 3071 3072 \subsection{BUG FIXES}{ 3073 \itemize{ 3074 \item Getting or setting \code{body()} or \code{formals()} on 3075 non-functions for now signals a warning and may become an error 3076 for setting. 3077 3078 \item \code{match(x, t)}, \code{duplicated(x)} and 3079 \code{unique(x)} work as documented for complex numbers with \code{NA}s 3080 or \code{NaN}s, where all those containing \code{NA} do match, 3081 whereas in the case of \code{NaN}'s both real and imaginary parts 3082 must match, compatibly with how \code{print()} and \code{format()} 3083 work for complex numbers. 3084 3085 \item \code{deparse(<complex>, options = "digits17")} prints more 3086 nicely now, mostly thanks to a suggestion by Richie Cotton. 3087 3088 \item Rotated symbols in plotmath expressions are now positioned 3089 correctly on \code{x11(type = "Xlib")}. (\PR{16948}) 3090 3091 \item \code{as<-()} avoids an infinite loop when a virtual class 3092 is interposed between a subclass and an actual superclass. 3093 3094 \item Fix level propagation in \code{unlist()} when the list 3095 contains zero-length lists or factors. 3096 3097 \item Fix S3 dispatch on S4 objects when the \pkg{methods} package is 3098 not attached. 3099 3100 \item Internal S4 dispatch sets \code{.Generic} in the method 3101 frame for consistency with \code{standardGeneric()}. (\PR{16929}) 3102 3103 \item Fix \code{order(x, decreasing = TRUE)} when \code{x} is an 3104 integer vector containing \code{MAX_INT}. Ported from a fix Matt 3105 Dowle made to \CRANpkg{data.table}. 3106 3107 \item Fix caching by \code{callNextMethod()}, resolves \PR{16973} 3108 and \PR{16974}. 3109 3110 \item \code{grouping()} puts NAs last, to be consistent with the 3111 default behavior of \code{order()}. 3112 3113 \item Point mass limit cases: \code{qpois(-2, 0)} now gives 3114 \code{NaN} with a warning and \code{qgeom(1, 1)} is \code{0}. 3115 (\PR{16972}) 3116 3117 \item \code{table()} no longer drops an \code{"NaN"} factor level, 3118 and better obeys \code{exclude = <chr>}, thanks to Suharto Anggono's 3119 patch for \PR{16936}. Also, in the case of \code{exclude = NULL} 3120 and \code{NA}s, these are tabulated correctly (again). 3121 3122 Further, \code{table(1:2, exclude = 1, useNA = "ifany")} no longer 3123 erroneously reports \code{<NA>} counts. 3124 3125 Additionally, all cases of empty \code{exclude} are equivalent, 3126 and \code{useNA} is not overwritten when specified (as it was by 3127 \code{exclude = NULL}). 3128 3129 \item \code{wilcox.test(x, conf.int=TRUE)} no longer errors out in 3130 cases where the confidence interval is not available, such as for 3131 \code{x = 0:2}. 3132 3133 \item \code{droplevels(f)} now keeps <NA> levels when present. 3134 3135 \item In integer arithmetic, \code{NULL} is now treated as 3136 \code{integer(0)} whereas it was previously treated as \code{double(0)}. 3137 3138 \item The radix sort considers \code{NA_real_} and \code{NaN} to 3139 be equivalent in rank (like the other sort algorithms). 3140 3141 \item When \code{index.return=TRUE} is passed to \code{sort.int()}, 3142 the radix sort treats \code{NA}s like \code{sort.list()} does 3143 (like the other sort algorithms). 3144 3145 \item When in \code{tabulate(bin, nbin)} \code{length(bin)} is 3146 larger than the maximal integer, the result is now of type 3147 \code{double} and hence no longer silently overflows to wrong 3148 values. (\PR{17140}) 3149 3150 \item \code{as.character.factor()} respects S4 inheritance when 3151 checking the type of its argument. (\PR{17141}) 3152 3153 \item The \code{factor} method for \code{print()} no longer sets 3154 the class of the factor to \code{NULL}, which would violate a 3155 basic constraint of an S4 object. 3156 3157 \item \code{formatC(x, flag = f)} allows two new flags, and 3158 signals an error for invalid flags also in the case of character 3159 formatting. 3160 3161 \item Reading from \code{file("stdin")} now also closes the 3162 connection and hence no longer leaks memory when reading from a 3163 full pipe, thanks to Gábor Csárdi, see thread starting at 3164 \url{https://stat.ethz.ch/pipermail/r-devel/2016-November/073360.html}. 3165 3166 \item Failure to create file in \code{tempdir()} for compressed 3167 \code{pdf()} graphics device no longer errors (then later 3168 segfaults). There is now a warning instead of error and 3169 compression is turned off for the device. Thanks to Alec 3170 Wysoker (\PR{17191}). 3171 3172 \item Asking for \code{methods()} on \code{"|"} returns only S3 3173 methods. See 3174 \url{https://stat.ethz.ch/pipermail/r-devel/2016-December/073476.html}. 3175 3176 \item \code{dev.capture()} using Quartz Cocoa device (macOS) returned 3177 invalid components if the back-end chose to use ARGB instead of RGBA 3178 image format. (Reported by Noam Ross.) 3179 3180 \item \code{seq("2", "5")} now works too, equivalently to 3181 \code{"2":"5"} and \code{seq.int()}. 3182 3183 \item \code{seq.int(to = 1, by = 1)} is now correct, other cases are 3184 integer (instead of \code{double}) when \code{seq()} is integer 3185 too, and the "non-finite" error messages are consistent between 3186 \code{seq.default()} and \code{seq.int()}, no longer mentioning 3187 \code{NaN} etc. 3188 3189 \item \code{rep(x, times)} and \code{rep.int(x, times)} now work 3190 when \code{times} is larger than the largest value representable 3191 in an integer vector. (\PR{16932}) 3192 3193 \item \code{download.file(method = "libcurl")} does not check for 3194 URL existence before attempting downloads; this is more robust to 3195 servers that do not support HEAD or range-based retrieval, but may 3196 create empty or incomplete files for aborted download requests. 3197 3198 \item Bandwidth selectors \code{bw.ucv()}, \code{bw.bcv()} and 3199 \code{bw.SJ()} now avoid integer overflow for large sample sizes. 3200 3201 \item \code{str()} no longer shows \code{"list output truncated"}, 3202 in cases that list was not shown at all. Thanks to Neal Fultz 3203 (\PR{17219}) 3204 3205 \item Fix for \code{cairo_pdf()} (and \code{svg()} and 3206 \code{cairo_ps()}) when replaying a saved display list that contains 3207 a mix of \pkg{grid} and \pkg{graphics} output. 3208 (Report by Yihui Xie.) 3209 3210 %% It never failed in a released version of R: pre-3.3.3 did 3211 %% \item \code{rep(3, list(4))} works again, as \code{\link{list}}s 3212 %% \emph{are} vectors. 3213 3214 \item The \code{str()} and \code{as.hclust()} methods for 3215 \code{"dendrogram"} now also work for deeply nested dendrograms 3216 thanks to non-recursive implementations by Bradley Broom. 3217 3218 \item \code{sample()} now uses two uniforms for added precision 3219 when the uniform generator is \code{Knuth-TAOCP}, 3220 \code{Knuth-TAOCP-2002}, or a user-defined generator and the 3221 population size is \eqn{2^{25}}{2^25} or greater. 3222 3223 \item If a vignette in the \file{vignettes} directory is listed in 3224 \file{.Rbuildignore}, \command{R CMD build} would not include it 3225 in the tarball, but would include it in the vignette database, 3226 leading to a check warning. (\PR{17246}) 3227 3228 \item \code{tools::latexToUtf8()} infinite looped on certain 3229 inputs. (\PR{17138}) 3230 3231 \item \code{terms.formula()} ignored argument names when determining 3232 whether two terms were identical. (\PR{17235}) 3233 3234 \item \code{callNextMethod()} was broken when called from a method 3235 that augments the formal arguments of a primitive generic. 3236 3237 \item Coercion of an S4 object to a vector during sub-assignment 3238 into a vector failed to dispatch through the \code{as.vector()} 3239 generic (often leading to a segfault). 3240 3241 \item Fix problems in command completion: Crash (\PR{17222}) 3242 and junk display in Windows, handling special characters in 3243 filenames on all systems. 3244 } 3245 } 3246} 3247 3248\section{\Rlogo CHANGES IN R 3.3.3}{ 3249 \subsection{NEW FEATURES}{ 3250 \itemize{ 3251 \item Changes when redirection of a \samp{http://} URL to a 3252 \samp{https://} URL is encountered: 3253 3254 \itemize{ 3255 \item The internal methods of \code{download.file()} and 3256 \code{url()} now report that they cannot follow this (rather 3257 than failing silently). 3258 3259 \item (Unix-alike) \code{download.file(method = "auto")} (the 3260 default) re-tries with \code{method = "libcurl"}. 3261 3262 \item (Unix-alike) \code{url(method = "default")} with an 3263 explicit \code{open} argument re-tries with 3264 \code{method = "libcurl"}. This covers many of the usages, 3265 e.g.\sspace{}\code{readLines()} with a URL argument. 3266 } 3267 } 3268 } 3269 3270 \subsection{INSTALLATION on a UNIX-ALIKE}{ 3271 \itemize{ 3272 \item The \command{configure} check for the \code{zlib} version is 3273 now robust to versions longer than 5 characters, including 3274 \code{1.2.11}. 3275 } 3276 } 3277 3278 \subsection{UTILITIES}{ 3279 \itemize{ 3280 \item Environmental variable \env{_R_CHECK_TESTS_NLINES_} controls 3281 how \command{R CMD check} reports failing tests (see §8 of the 3282 \sQuote{R Internals} manual). 3283 } 3284 } 3285 3286 \subsection{DEPRECATED AND DEFUNCT}{ 3287 \itemize{ 3288 \item (C-level Native routine registration.) The undocumented 3289 \code{styles} field of the components of \code{R_CMethodDef} and 3290 \code{R_FortranMethodDef} is deprecated. 3291 } 3292 } 3293 3294 \subsection{BUG FIXES}{ 3295 \itemize{ 3296 \item \code{vapply(x, *)} now works with long vectors \code{x}. 3297 (\PR{17174}) 3298 3299 \item \code{isS3method("is.na.data.frame")} and similar are 3300 correct now. (\PR{17171}) 3301 3302 \item \code{grepRaw(<long>, <short>, fixed = TRUE)} now works, 3303 thanks to a patch by Mikko Korpela. (\PR{17132}) 3304 3305 \item Package installation into a library where the package exists 3306 \emph{via} symbolic link now should work wherever 3307 \code{Sys.readlink()} works, resolving \PR{16725}. 3308 3309 \item \code{"Cincinnati"} was missing an \code{"n"} in the 3310 \code{precip} dataset. 3311 3312 \item Fix buffer overflow vulnerability in \code{pdf()} when 3313 loading an encoding file. Reported by Talos (TALOS-2016-0227). 3314 3315 \item \code{getDLLRegisteredRoutines()} now produces its warning 3316 correctly when multiple DLLs match, thanks to Matt Dowle's \PR{17184}. 3317 3318 \item \code{Sys.timezone()} now returns non-NA also on platforms 3319 such as \samp{Ubuntu 14.04.5 LTS}, thanks to Mikko Korpela's 3320 \PR{17186}. 3321 3322 \item \code{format(x)} for an illegal \code{"POSIXlt"} object 3323 \code{x} no longer segfaults. 3324 3325 \item \code{methods(f)} now also works for \code{f} \code{"("} 3326 or \code{"{"}. 3327 3328 \item (Windows only) \code{dir.create()} did not check the length 3329 of the path to create, and so could overflow a buffer and crash 3330 \R. (\PR{17206}) 3331 3332 \item On some systems, very small hexadecimal numbers in hex notation 3333 would underflow to zero. (\PR{17199}) 3334 3335 \item \code{pmin()} and \code{pmax()} now work again for 3336 \code{ordered} factors and 0-length S3 classed objects, thanks to 3337 Suharto Anggono's \PR{17195} and \PR{17200}. 3338 3339 \item \code{bug.report()} did not do any validity checking on a 3340 package's \samp{BugReports} field. It now ignores an empty field, 3341 removes leading whitespace and only attempts to open 3342 \samp{http://} and \samp{https://} URLs, falling back to emailing 3343 the maintainer. 3344 3345 \item Bandwidth selectors \code{bw.ucv()} and 3346 \code{bw.SJ()} gave incorrect answers or incorrectly reported an 3347 error (because of integer overflow) for inputs longer than 3348 46341. Similarly for \code{bw.bcv()} at length 5793. 3349 3350 Another possible integer overflow is checked and may result in an 3351 error report (rather than an incorrect result) for much longer 3352 inputs (millions for a smooth distribution). 3353 3354 \item \code{findMethod()} failed if the active signature had 3355 expanded beyond what a particular package used. (Example with 3356 packages \CRANpkg{XR} and \CRANpkg{XRJulia} on \acronym{CRAN}.) 3357 3358 \item \code{qbeta()} underflowed too early in some very asymmetric 3359 cases. (\PR{17178}) 3360 3361 \item \command{R CMD Rd2pdf} had problems with packages with 3362 non-ASCII titles in \file{.Rd} files (usually the titles were 3363 omitted). 3364 } 3365 } 3366} 3367 3368\section{\Rlogo CHANGES IN R 3.3.2}{ 3369 \subsection{NEW FEATURES}{ 3370 \itemize{ 3371 \item \code{extSoftVersion()} now reports the version (if any) of 3372 the \code{readline} library in use. 3373 3374 \item The version of LAPACK included in the sources has been 3375 updated to 3.6.1, a bug-fix release including a speedup for the 3376 non-symmetric case of \code{eigen()}. 3377 3378 \item Use \code{options(deparse.max.lines=)} to limit the number 3379 of lines recorded in \code{.Traceback} and other deparsing 3380 activities. 3381 3382 \item \code{format(<AsIs>)} looks more regular, also for 3383 non-character atomic matrices. 3384 3385 \item \code{abbreviate()} gains an option \code{named = TRUE}. 3386 3387 \item The online documentation for package \pkg{methods} is 3388 extensively rewritten. The goals are to simplify 3389 documentation for basic use, to note old features not 3390 recommended and to correct out-of-date information. 3391 3392 \item Calls to \code{setMethod()} no longer print a message when 3393 creating a generic function in those cases where that is 3394 natural: S3 generics and primitives. 3395 } 3396 } 3397 3398 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 3399 \itemize{ 3400 \item Versions of the \code{readline} library >= 6.3 had been 3401 changed so that terminal window resizes were not signalled to 3402 \code{readline}: code has been added using a explicit signal 3403 handler to work around that (when \R is compiled against readline 3404 >= 6.3). (\PR{16604}) 3405 3406 \item \command{configure} works better with Oracle Developer 3407 Studio 12.5. 3408 } 3409 } 3410 3411 \subsection{UTILITIES}{ 3412 \itemize{ 3413 \item \command{R CMD check} reports more dubious flags in files 3414 \file{src/Makevars[.in]}, including \option{-w} and \option{-g}. 3415 3416 \item \command{R CMD check} has been set up to filter important 3417 warnings from recent versions of \command{gfortran} with 3418 \option{-Wall -pedantic}: this now reports non-portable GNU 3419 extensions such as out-of-order declarations. 3420 3421 \item \command{R CMD config} works better with paths containing 3422 spaces, even those of home directories (as reported by Ken Beath). 3423 } 3424 } 3425 3426 \subsection{DEPRECATED AND DEFUNCT}{ 3427 \itemize{ 3428 \item Use of the C/C++ macro \samp{NO_C_HEADERS} is deprecated 3429 (no C headers are included by \R headers from C++ as from \R 3430 3.3.0, so it should no longer be needed). 3431 } 3432 } 3433 3434 \subsection{BUG FIXES}{ 3435 \itemize{ 3436 \item The check for non-portable flags in \command{R CMD check} 3437 could be stymied by \file{src/Makevars} files which contained 3438 targets. 3439 3440 \item (Windows only) When using certain desktop themes in Windows 3441 7 or higher, \kbd{Alt-Tab} could cause \command{Rterm} to stop 3442 accepting input. (\PR{14406}; patch submitted by Jan Gleixner.) 3443 3444 \item \code{pretty(d, ..)} behaves better for date-time \code{d} 3445 (\PR{16923}). 3446 3447 \item When an S4 class name matches multiple classes in the S4 3448 cache, perform a dynamic search in order to obey namespace 3449 imports. This should eliminate annoying messages about multiple 3450 hits in the class cache. Also, pass along the package from the 3451 \code{ClassExtends} object when looking up superclasses in the 3452 cache. 3453 3454 \item \code{sample(NA_real_)} now works. 3455 3456 \item Packages using non-ASCII encodings in their code did not 3457 install data properly on systems using different encodings. 3458 3459 \item \code{merge(df1, df2)} now also works for data frames with 3460 column names \code{"na.last"}, \code{"decreasing"}, or 3461 \code{"method"}. (\PR{17119}) 3462 3463 \item \code{contour()} caused a segfault if the \code{labels} 3464 argument had length zero. (Reported by Bill Dunlap.) 3465 3466 \item \code{unique(warnings())} works more correctly, thanks to a 3467 new \code{duplicated.warnings()} method. 3468 3469 \item \code{findInterval(x, vec = numeric(), all.inside = TRUE)} 3470 now returns \code{0}s as documented. (Reported by Bill Dunlap.) 3471 3472 \item (Windows only) \command{R CMD SHLIB} failed when a symbol 3473 in the resulting library had the same name as a keyword in 3474 the \file{.def} file. (\PR{17130}) 3475 3476 \item \code{pmax()} and \code{pmin()} now work with (more ?) 3477 classed objects, such as \code{"Matrix"} from the \CRANpkg{Matrix} 3478 package, as documented for a long time. 3479 3480 \item \code{axis(side, x = D)} and hence \code{Axis()} and 3481 \code{plot()} now work correctly for \code{"Date"} and time 3482 objects \code{D}, even when \dQuote{time goes backward}, e.g., 3483 with decreasing \code{xlim}. (Reported by William May.) 3484 3485 \item \code{str(I(matrix(..)))} now looks as always intended. 3486 3487 \item \code{plot.ts()}, the \code{plot()} method for time series, 3488 now respects \code{cex}, \code{lwd} and \code{lty}. (Reported by 3489 Greg Werbin.) 3490 3491 \item \code{parallel::mccollect()} now returns a named list (as 3492 documented) when called with \code{wait = FALSE}. (Reported by 3493 Michel Lang.) 3494 3495 \item If a package added a class to a class union in another 3496 package, loading the first package gave erroneous warnings 3497 about \dQuote{undefined subclass}. 3498 3499 \item \code{c()}'s argument \code{use.names} is documented now, as 3500 belonging to the (C internal) default method. In 3501 \dQuote{parallel}, argument \code{recursive} is also moved from 3502 the generic to the default method, such that the formal argument list 3503 of \pkg{base} generic \code{c()} is just \code{(...)}. 3504 3505 \item \code{rbeta(4, NA)} and similarly \code{rgamma()} and 3506 \code{rnbinom()} now return \code{NaN}'s with a warning, as other 3507 r<dist>(), and as documented. (\PR{17155}) 3508 3509 \item Using \code{options(checkPackageLicense = TRUE)} no longer 3510 requires acceptance of the licence for non-default standard 3511 packages such as \pkg{compiler}. (Reported by Mikko Korpela.) 3512 3513 \item \code{split(<very_long>, *)} now works even when the split 3514 off parts are long. (\PR{17139}) 3515 3516 \item \code{min()} and \code{max()} now also work correctly when 3517 the argument list starts with \code{character(0)}. (\PR{17160}) 3518 3519 \item Subsetting very large matrices (\code{prod(dim(.)) >= 2^31}) 3520 now works thanks to Michael Schubmehl's \PR{17158}. 3521 3522 \item \code{bartlett.test()} used residual sums of squares 3523 instead of variances, when the argument was a list of \code{lm} objects. 3524 (Reported by Jens Ledet Jensen). 3525 3526 \item \code{plot(<lm>, which = *)} now correctly labels the 3527 contour lines for the standardized residuals for \code{which = 6}. 3528 It also takes the correct \eqn{p} in case of singularities (also 3529 for \code{which = 5}). (\PR{17161}) 3530 3531 \item \code{xtabs(~ exclude)} no longer fails from wrong scope, 3532 thanks to Suharto Anggono's \PR{17147}. 3533 3534 \item Reference class calls to \code{methods()} did not 3535 re-analyse previously defined methods, meaning that calls to 3536 methods defined later would fail. (Reported by Charles Tilford). 3537 3538 \item \code{findInterval(x, vec, left.open = TRUE)} misbehaved in some 3539 cases. (Reported by Dmitriy Chernykh.) 3540 } 3541 } 3542} 3543 3544\section{\Rlogo CHANGES IN R 3.3.1}{ 3545 \subsection{BUG FIXES}{ 3546 \itemize{ 3547 \item \command{R CMD INSTALL} and hence \code{install.packages()} 3548 gave an internal error installing a package called 3549 \pkg{description} from a tarball on a case-insensitive file system. 3550 3551 \item \code{match(x, t)} (and hence \code{x \%in\% t}) failed 3552 when \code{x} was of length one, and either \code{character} and \code{x} 3553 and \code{t} only differed in their \code{Encoding} or when 3554 \code{x} and \code{t} where \code{complex} with \code{NA}s or \code{NaN}s. 3555 (\PR{16885}.) 3556 3557 \item \code{unloadNamespace(ns)} also works again when \code{ns} is a 3558 \sQuote{namespace}, as from \code{getNamespace()}. 3559 3560 \item \code{rgamma(1, Inf)} or \code{rgamma(1, 0, 0)} no longer give 3561 \code{NaN} but the correct limit. 3562 3563 \item \code{length(baseenv())} is correct now. 3564 3565 \item \code{pretty(d, ..)} for date-time \code{d} rarely failed 3566 when \code{"halfmonth"} time steps were tried (\PR{16923}) and 3567 on \sQuote{inaccurate} platforms such as 32-bit Windows or 3568 a configuration with \command{--disable-long-double}; see comment 3569 #15 of \PR{16761}. 3570 3571 \item In \code{text.default(x, y, labels)}, the rarely(?) used 3572 default for \code{labels} is now correct also for the case of a 3573 2-column matrix \code{x} and missing \code{y}. 3574 3575 \item \code{as.factor(c(a = 1L))} preserves \code{names()} again 3576 as in \R < 3.1.0. 3577 3578 \item \code{strtrim(""[0], 0[0])} now works. 3579 3580 \item Use of \code{Ctrl-C} to terminate a reverse incremental 3581 search started by \code{Ctrl-R} in the \code{readline}-based Unix 3582 terminal interface is now supported when \R{} was compiled against 3583 \code{readline} >= 6.0 (\code{Ctrl-G} always worked). 3584 (\PR{16603}) 3585 3586 \item \code{diff(<difftime>)} now keeps the \code{"units"} 3587 attribute, as subtraction already did, \PR{16940}. 3588 } 3589 } 3590} 3591 3592\section{\Rlogo CHANGES IN R 3.3.0}{ 3593 \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{ 3594 \itemize{ 3595 \item \code{nchar(x, *)}'s argument \code{keepNA} governing how 3596 the result for \code{NA}s in \code{x} is determined, gets a new 3597 default \code{keepNA = NA} which returns \code{NA} where 3598 \code{x} is \code{NA}, except for \code{type = "width"} which still 3599 returns \code{2}, the formatting / printing width of \code{NA}. 3600 3601 \item All builds have support for \samp{https:} URLs in the 3602 default methods for \code{download.file()}, \code{url()} and code 3603 making use of them. 3604 3605 Unfortunately that cannot guarantee that any particular 3606 \samp{https:} URL can be accessed. For example, server and client 3607 have to successfully negotiate a cryptographic protocol (TLS/SSL, 3608 \dots) and the server's identity has to be verifiable \emph{via} 3609 the available certificates. Different access methods may allow 3610 different protocols or use private certificate bundles: we 3611 encountered a \samp{https:} CRAN mirror which could be accessed by 3612 one browser but not by another nor by \code{download.file()} on 3613 the same Linux machine. 3614 } 3615 } 3616 3617 \subsection{NEW FEATURES}{ 3618 \itemize{ 3619 \item The \code{print} method for \code{methods()} gains a 3620 \code{byclass} argument. 3621 3622 \item New functions \code{validEnc()} and \code{validUTF8()} to 3623 give access to the validity checks for inputs used by 3624 \code{grep()} and friends. 3625 3626 \item Experimental new functionality for S3 method checking, notably 3627 \code{isS3method()}. 3628 3629 Also, the names of the \R \sQuote{language elements} are exported 3630 as character vector \code{tools::langElts}. 3631 3632 \item \code{str(x)} now displays \code{"Time-Series"} also for 3633 matrix (multivariate) time-series, i.e. when \code{is.ts(x)} is true. 3634 3635 \item (Windows only) The GUI menu item to install local packages 3636 now accepts \file{*.tar.gz} files as well as \file{*.zip} files 3637 (but defaults to the latter). 3638 3639 \item New programmeR's utility function \code{chkDots()}. 3640 3641 \item \code{D()} now signals an error when given invalid input, 3642 rather than silently returning \code{NA}. (Request of John Nash.) 3643 3644 \item \code{formula} objects are slightly more \dQuote{first class}: 3645 e.g., \code{formula()} or \code{new("formula", y ~ x)} are now 3646 valid. Similarly, for \code{"table"}, \code{"ordered"} and 3647 \code{"summary.table"}. Packages defining S4 classes with the above 3648 S3/S4 classes as slots should be reinstalled. 3649 % notably if their classes are reused in other 3650 % packages. e.g. re-install arules for arulesSequence, flexmix for betareg 3651 3652 \item New function \code{strrep()} for repeating the elements of a 3653 character vector. 3654 3655 \item \code{rapply()} preserves attributes on the list when 3656 \code{how = "replace"}. 3657 3658 \item New S3 generic function \code{sigma()} with methods for 3659 extracting the estimated standard deviation aka \dQuote{residual 3660 standard deviation} from a fitted model. 3661 3662 \item \code{news()} now displays \R and package news files within 3663 the HTML help system if it is available. If no news file is found, 3664 a visible \code{NULL} is returned to the console. 3665 3666 \item \code{as.raster(x)} now also accepts \code{raw} arrays 3667 \code{x} assuming values in \code{0:255}. 3668 3669 \item Subscripting of matrix/array objects of type 3670 \code{"expression"} is now supported. 3671 3672 \item \code{type.convert("i")} now returns a factor instead of a 3673 complex value with zero real part and missing imaginary part. 3674 3675 \item Graphics devices \code{cairo_pdf()} and \code{cairo_ps()} 3676 now allow non-default values of the cairographics \sQuote{fallback 3677 resolution} to be set. 3678 3679 This now defaults to 300 on all platforms: that is the default 3680 documented by cairographics, but apparently was not used by all 3681 system installations. 3682 3683 \item \code{file()} gains an explicit \code{method} argument 3684 rather than implicitly using 3685 \code{getOption("url.method", "default")}. 3686 3687 \item Thanks to a patch from Tomas Kalibera, \code{x[x != 0]} is 3688 now typically faster than \code{x[which(x != 0)]} (in the case 3689 where \code{x} has no NAs, the two are equivalent). 3690 3691 \item \code{read.table()} now always uses the names for a named 3692 \code{colClasses} argument (previously names were only used when 3693 \code{colClasses} was too short). (In part, wish of \PR{16478}.) 3694 3695 \item (Windows only) \code{download.file()} with default 3696 \code{method = "auto"} and a \samp{ftps://} URL chooses 3697 \code{"libcurl"} if that is available. 3698 3699 \item The out-of-the box Bioconductor mirror has been changed to 3700 one using \samp{https://}: use \code{chooseBioCmirror()} to choose 3701 a \samp{http://} mirror if required. 3702 3703 \item The data frame and formula methods for \code{aggregate()} 3704 gain a \code{drop} argument. 3705 3706 \item \code{available.packages()} gains a \code{repos} argument. 3707 3708 \item The undocumented switching of methods for \code{url()} on 3709 \samp{https:} and \samp{ftps:} URLs is confined to 3710 \code{method = "default"} (and documented). 3711 3712 \item \code{smoothScatter()} gains a \code{ret.selection} argument. 3713 3714 \item \code{qr()} no longer has a \code{\dots} argument to pass 3715 additional arguments to methods. 3716 3717 \item \code{[} has a method for class \code{"table"}. 3718 3719 \item It is now possible (again) to \code{replayPlot()} a 3720 display list snapshot that was created by \code{recordPlot()} 3721 in a different \R session. 3722 3723 It is still not a good idea to use snapshots as a persistent 3724 storage format for \R plots, but it is now not completely silly to 3725 use a snapshot as a format for transferring an R plot between two 3726 R sessions. 3727 3728 The underlying changes mean that packages providing graphics 3729 devices (e.g., \CRANpkg{Cairo}, \CRANpkg{RSvgDevice}, 3730 \CRANpkg{cairoDevice}, \CRANpkg{tikzDevice}) will need to be 3731 reinstalled. 3732 3733 Code for restoring snapshots was contributed by Jeroen Ooms 3734 and JJ Allaire. 3735 3736 Some testing code is available at 3737 \url{https://github.com/pmur002/R-display-list}. 3738 3739 \item \code{tools::undoc(dir = D)} and \code{codoc(dir = D)} now 3740 also work when \code{D} is a directory whose \code{normalizePath()}ed 3741 version does not end in the package name, e.g.\sspace{}from a symlink. 3742 3743 \item \code{abbreviate()} has more support for multi-byte 3744 character sets -- it no longer removes bytes within characters and 3745 knows about Latin vowels with accents. It is still only 3746 really suitable for (most) European languages, and still warns on 3747 non-ASCII input. 3748 3749 \code{abbreviate(use.classes = FALSE)} is now implemented, and 3750 that is more suitable for non-European languages. 3751 3752 \item \code{match(x, table)} is faster (sometimes by an order of 3753 magnitude) when \code{x} is of length one and \code{incomparables} 3754 is unchanged, thanks to Peter Haverty (\PR{16491}). 3755 3756 \item More consistent, partly not back-compatible behavior of 3757 \code{NA} and \code{NaN} coercion to complex numbers, operations 3758 less often resulting in complex \code{NA} (\code{NA_complex_}). 3759 3760 \item \code{lengths()} considers methods for \code{length} and 3761 \code{[[} on \code{x}, so it should work automatically on any 3762 objects for which appropriate methods on those generics are 3763 defined. 3764 3765 \item The logic for selecting the default screen device on OS X 3766 has been simplified: it is now \code{quartz()} if that is 3767 available even if environment variable \env{DISPLAY} has been set 3768 by the user. 3769 3770 The choice can easily be overridden \emph{via} environment 3771 variable \env{R_INTERACTIVE_DEVICE}. 3772 3773 \item On Unix-like platforms which support the \command{getline} C 3774 library function, \code{system(*, intern = TRUE)} no longer 3775 truncates (output) lines longer than 8192 characters, thanks to 3776 Karl Millar. (\PR{16544}) 3777 3778 \item \code{rank()} gains a \code{ties.method = "last"} option, 3779 for convenience (and symmetry). 3780 3781 %% \item \code{getRcode(vignette(..))} is the \R source file name of 3782 %% a vignette. 3783 3784 \item \code{regmatches(invert = NA)} can now be used to extract 3785 both non-matched and matched substrings. 3786 3787 \item \code{data.frame()} gains argument \code{fix.empty.names}; 3788 \code{as.data.frame.list()} gets new \code{cut.names}, 3789 \code{col.names} and \code{fix.empty.names}. 3790 3791 \item \code{plot(x ~ x, *)} now warns that it is the same as 3792 \code{plot(x ~ 1, *)}. 3793 3794 \item \code{recordPlot()} has new arguments \code{load} and 3795 \code{attach} to allow package names to be stored as part of a 3796 recorded plot. \code{replayPlot()} has new argument 3797 \code{reloadPkgs} to load/attach any package names that were 3798 stored as part of a recorded plot. 3799 3800 \item S4 dispatch works within calls to \code{.Internal()}. This 3801 means explicit S4 generics are no longer needed for 3802 \code{unlist()} and \code{as.vector()}. 3803 3804 \item Only font family names starting with \samp{"Hershey"} (and 3805 not \samp{"Her"} as before) are given special treatment by the 3806 graphics engine. 3807 3808 \item S4 values are automatically coerced to vector (\emph{via} 3809 \code{as.vector}) when subassigned into atomic vectors. 3810 3811 \item \code{findInterval()} gets a \code{left.open} option. 3812 3813 \item The version of LAPACK included in the sources has been 3814 updated to 3.6.0, including those \sQuote{deprecated} routines 3815 which were previously included. \emph{Ca} 40 double-complex 3816 routines have been added at the request of a package maintainer. 3817 3818 As before, the details of what is included are in 3819 \file{src/modules/lapack/README} and this now gives information on 3820 earlier additions. 3821 3822 \item \code{tapply()} has been made considerably more efficient 3823 without changing functionality, thanks to proposals from Peter 3824 Haverty and Suharto Anggono. (\PR{16640}) 3825 3826 \item \code{match.arg(arg)} (the one-argument case) is faster; so 3827 is \code{sort.int()}. (\PR{16652}) 3828 3829 \item The \code{format} method for \code{object_size} objects now 3830 also accepts \dQuote{binary} units such as \code{"KiB"} and e.g., 3831 \code{"Tb"}. (Partly from \PR{16649}.) 3832 3833 \item Profiling now records calls of the form \code{foo::bar} and 3834 some similar cases directly rather than as calls to 3835 \code{<Anonymous>}. Contributed by Winston Chang. 3836 3837 \item New string utilities \code{startsWith(x, prefix)} and 3838 \code{endsWith(x, suffix)}. Also provide speedups for some 3839 \code{grepl("^...", *)} uses (related to proposals in \PR{16490}). 3840 3841 \item Reference class finalizers run at exit, as well as on 3842 garbage collection. 3843 3844 \item Avoid \pkg{parallel} dependency on \pkg{stats} for port 3845 choice and random number seeds. (\PR{16668}) 3846 3847 \item The radix sort algorithm and implementation from 3848 \CRANpkg{data.table} (\code{forder}) replaces the previous radix 3849 (counting) sort and adds a new method for \code{order()}. 3850 Contributed by Matt Dowle and Arun Srinivasan, the new algorithm 3851 supports logical, integer (even with large values), real, and 3852 character vectors. It outperforms all other methods, but there 3853 are some caveats (see \code{?sort}). 3854 3855 \item The \code{order()} function gains a \code{method} argument 3856 for choosing between \code{"shell"} and \code{"radix"}. 3857 3858 \item New function \code{grouping()} returns a permutation that 3859 stably rearranges data so that identical values are adjacent. The 3860 return value includes extra partitioning information on the 3861 groups. The implementation came included with the new radix sort. 3862 3863 \item \code{rhyper(nn, m, n, k)} no longer returns \code{NA} when 3864 one of the three parameters exceeds the maximal integer. 3865 3866 \item \code{switch()} now warns when no alternatives are provided. 3867 3868 \item \code{parallel::detectCores()} now has default \code{logical 3869 = TRUE} on all platforms -- as this was the default on Windows, 3870 this change only affects Sparc Solaris. 3871 3872 Option \code{logical = FALSE} is now supported on Linux and recent 3873 versions of OS X (for the latter, thanks to a suggestion of Kyaw 3874 Sint). 3875 3876 \item \code{hist()} for \code{"Date"} or \code{"POSIXt"} objects 3877 would sometimes give misleading labels on the breaks, as they 3878 were set to the day before the start of the period being 3879 displayed. The display format has been changed, and the shift of the 3880 start day has been made conditional on \code{right = TRUE} (the 3881 default). (\PR{16679}) 3882 3883 \item \R now uses a new version of the logo (donated to the R 3884 Foundation by RStudio). It is defined in \file{.svg} format, so 3885 will resize without unnecessary degradation when displayed on 3886 HTML pages---there is also a vector PDF version. Thanks to 3887 Dirk Eddelbuettel for producing the corresponding X11 icon. 3888 3889 \item New function \code{.traceback()} returns the stack trace 3890 which \code{traceback()} prints. 3891 3892 \item \code{lengths()} dispatches internally. 3893 3894 \item \code{dotchart()} gains a \code{pt.cex} argument to control 3895 the size of points separately from the size of plot labels. 3896 Thanks to Michael Friendly and Milan Bouchet-Valat for ideas 3897 and patches. 3898 3899 \item \code{as.roman(ch)} now correctly deals with more diverse 3900 character vectors \code{ch}; also arithmetic with the resulting 3901 roman numbers works in more cases. (\PR{16779}) 3902 3903 \item \code{prcomp()} gains a new option \code{rank.} allowing to 3904 directly aim for less than \code{min(n,p)} PC's. The 3905 \code{summary()} and its \code{print()} method have been amended, 3906 notably for this case. 3907 3908 \item \code{gzcon()} gains a new option \code{text}, which marks 3909 the connection as text-oriented (so e.g.\sspace{}\code{pushBack()} 3910 works). It is still always opened in binary mode. 3911 3912 \item The \code{import()} namespace directive now accepts an 3913 argument \code{except} which names symbols to exclude from the 3914 imports. The \code{except} expression should evaluate to a 3915 character vector (after substituting symbols for strings). See 3916 Writing R Extensions. 3917 3918 \item New convenience function \code{Rcmd()} in package 3919 \pkg{tools} for invoking \command{R CMD} tools from within \R. 3920 3921 \item New functions \code{makevars_user()} and 3922 \code{makevars_site()} in package \pkg{tools} to determine the 3923 location of the user and site specific \file{Makevars} files for 3924 customizing package compilation. 3925 } 3926 } 3927 3928 \subsection{UTILITIES}{ 3929 \itemize{ 3930 \item \command{R CMD check} has a new option 3931 \option{--ignore-vignettes} for use with non-Sweave vignettes 3932 whose \samp{VignetteBuilder} package is not available. 3933 3934 \item \command{R CMD check} now by default checks code usage 3935 (\emph{via} \CRANpkg{codetools}) with only the base package 3936 attached. Functions from default packages other than \pkg{base} 3937 which are used in the package code but not imported are reported 3938 as undefined globals, with a suggested addition to the 3939 \code{NAMESPACE} file. 3940 3941 \item \command{R CMD check --as-cran} now also checks DOIs in 3942 package \file{CITATION} and Rd files. 3943 3944 \item \command{R CMD Rdconv} and \command{R CMD Rd2pdf} each have 3945 a new option \option{--RdMacros=pkglist} which allows Rd macros 3946 to be specified before processing. 3947 } 3948 } 3949 3950 \subsection{DEPRECATED AND DEFUNCT}{ 3951 \itemize{ 3952 \item The previously included versions of \code{zlib}, 3953 \code{bzip2}, \code{xz} and PCRE have been removed, so suitable 3954 external (usually system) versions are required (see the 3955 \sQuote{R Installation and Administration} manual). 3956 3957 \item The unexported and undocumented Windows-only devices 3958 \code{cairo_bmp()}, \code{cairo_png()} and \code{cairo_tiff()} 3959 have been removed. (These devices should be used as 3960 e.g.\sspace{}\code{bmp(type = "cairo")}.) 3961 3962 \item (Windows only) Function \code{setInternet2()} has no effect 3963 and will be removed in due course. The choice between methods 3964 \code{"internal"} and \code{"wininet"} is now made by the 3965 \code{method} arguments of \code{url()} and \code{download.file()} 3966 and their defaults can be set \emph{via} options. The 3967 out-of-the-box default remains \code{"wininet"} (as it has been 3968 since \R 3.2.2). 3969 3970 \item \code{[<-} with an S4 value into a list currently embeds the 3971 S4 object into its own list such that the end result is roughly 3972 equivalent to using \code{[[<-}. That behavior is deprecated. In 3973 the future, the S4 value will be coerced to a list with 3974 \code{as.list()}. 3975 3976 \item Package \pkg{tools}' functions 3977 \code{package.dependencies()}, \code{pkgDepends()}, etc are 3978 deprecated now, mostly in favor of \code{package_dependencies()} 3979 which is both more flexible and efficient. 3980 } 3981 } 3982 3983 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 3984 \itemize{ 3985 \item Support for very old versions of \command{valgrind} 3986 (e.g., 3.3.0) has been removed. 3987 3988 \item The included \command{libtool} script (generated by 3989 \command{configure}) has been updated to version 2.4.6 (from 2.2.6a). 3990 3991 \item \code{libcurl} version 7.28.0 or later with support for the 3992 \code{https} protocol is required for installation (except on 3993 Windows). 3994 3995 \item BSD networking is now required (except on Windows) and so 3996 \code{capabilities("http/ftp")} is always true. 3997 3998 \item \command{configure} uses \command{pkg-config} for PNG, TIFF 3999 and JPEG where this is available. This should work better with 4000 multiple installs and with those using static libraries. 4001 4002 \item The minimum supported version of OS X is 10.6 (\sQuote{Snow 4003 Leopard}): even that has been unsupported by Apple since 2012. 4004 4005 \item The \command{configure} default on OS X is 4006 \option{--disable-R-framework}: enable this if you intend to 4007 install under \file{/Library/Frameworks} and use with \code{R.app}. 4008 4009 \item The minimum preferred version of PCRE has since \R 3.0.0 4010 been 8.32 (released in Nov 2012). Versions 8.10 to 8.31 are now 4011 deprecated (with warnings from \command{configure}), but will 4012 still be accepted until \R 3.4.0. 4013 4014 \item \command{configure} looks for C functions \code{__cospi}, 4015 \code{__sinpi} and \code{__tanpi} and uses these if \code{cospi} 4016 \emph{etc} are not found. (OS X is the main instance.) 4017 4018 \item (Windows) R is now built using \command{gcc} 4019 4.9.3. This build will require recompilation of at least those packages 4020 that include C++ code, and possibly others. A build of R-devel using 4021 the older toolchain will be temporarily available for comparison 4022 purposes. 4023 4024 During the transition, the environment variable 4025 \env{R_COMPILED_BY} has been defined to indicate which toolchain 4026 was used to compile R (and hence, which should be used to compile 4027 code in packages). The \code{COMPILED_BY} variable described below 4028 will be a permanent replacement for this. 4029 4030 \item (Windows) A \command{make} and \command{R CMD config} variable 4031 named \code{COMPILED_BY} has been added. This indicates 4032 which toolchain was used to compile R (and hence, which should be 4033 used to compile code in packages). 4034 } 4035 } 4036 4037 \subsection{PACKAGE INSTALLATION}{ 4038 \itemize{ 4039 \item The \command{make} macro \code{AWK} which used to be made 4040 available to files such as \file{src/Makefile} is no longer set. 4041 } 4042 } 4043 4044 \subsection{C-LEVEL FACILITIES}{ 4045 \itemize{ 4046 \item The API call \code{logspace_sum} introduced in \R 3.2.0 is 4047 now remapped as an entry point to \code{Rf_logspace_sum}, and its 4048 first argument has gained a \code{const} qualifier. (\PR{16470}) 4049 4050 Code using it will need to be reinstalled. 4051 4052 Similarly, entry point \code{log1pexp} also defined in 4053 \file{Rmath.h} is remapped there to \code{Rf_log1pexp} 4054 4055 \item \code{R_GE_version} has been increased to \code{11}. 4056 4057 \item New API call \code{R_orderVector1}, a faster 4058 one-argument version of \code{R_orderVector}. 4059 4060 \item When \R{} headers such as \file{R.h} and \file{Rmath.h} are 4061 called from C++ code in packages they include the C++ versions of 4062 system headers such as \file{<cmath>} rather than the legacy 4063 headers such as \file{<math.h>}. (Headers \file{Rinternals.h} and 4064 \file{Rinterface.h} already did, and inclusion of system headers 4065 can still be circumvented by defining \code{NO_C_HEADERS}, 4066 including as from this version for those two headers.) 4067 4068 The manual has long said that \R{} headers should \bold{not} be 4069 included within an \code{extern "C"} block, and almost all the 4070 packages affected by this change were doing so. 4071 4072 \item Including header \file{S.h} from C++ code would fail on some 4073 platforms, and so gives a compilation error on all. 4074 4075 \item The deprecated header \file{Rdefines.h} is now compatible 4076 with defining \code{R_NO_REMAP}. 4077 4078 \item The connections interface now includes a function 4079 \code{R_GetConnection()} which allows packages implementing 4080 connections to convert R \code{connection} objects to 4081 \code{Rconnection} handles. Code which previously 4082 used the low-level R-internal \code{getConnection()} entry point 4083 should switch. 4084 } 4085 } 4086 4087 \subsection{BUG FIXES}{ 4088 \itemize{ 4089 \item C-level \code{asChar(x)} is fixed for when \code{x} is not a 4090 vector, and it returns \code{"TRUE"}/\code{"FALSE"} instead of 4091 \code{"T"}/\code{"F"} for logical vectors. 4092 4093 \item The first arguments of \code{.colSums()} etc (with an 4094 initial dot) are now named \code{x} rather than \code{X} (matching 4095 \code{colSums()}): thus error messages are corrected. 4096 4097 \item A \code{coef()} method for class \code{"maov"} has been 4098 added to allow \code{vcov()} to work with multivariate 4099 results. (\PR{16380}) 4100 4101 \item \code{method = "libcurl"} connections signal errors rather 4102 than retrieving HTTP error pages (where the ISP reports the 4103 error). 4104 4105 \item \code{xpdrows.data.frame()} was not checking for unique 4106 row names; in particular, this affected assignment to non-existing 4107 rows \emph{via} numerical indexing. (\PR{16570}) 4108 4109 \item \code{tail.matrix()} did not work for zero rows matrices, 4110 and could produce row \dQuote{labels} such as \code{"[1e+05,]"}. 4111 4112 \item Data frames with a column named \code{"stringsAsFactors"} 4113 now format and print correctly. (\PR{16580}) 4114 4115 \item \code{cor()} is now guaranteed to return a value with 4116 absolute value less than or equal to 1. (\PR{16638}) 4117 4118 \item Array subsetting now keeps \code{names(dim(.))}. 4119 4120 \item Blocking socket connection selection recovers more 4121 gracefully on signal interrupts. 4122 4123 \item The \code{data.frame} method of \code{rbind()} construction 4124 \code{row.names} works better in borderline integer cases, but 4125 may change the names assigned. (\PR{16666}) 4126 4127 \item (X11 only) \code{getGraphicsEvent()} miscoded buttons and 4128 missed mouse motion events. (\PR{16700}) 4129 4130 \item \code{methods(round)} now also lists \code{round.POSIXt}. 4131 4132 \item \code{tar()} now works with the default \code{files = NULL}. 4133 (\PR{16716}) 4134 4135 \item Jumps to outer contexts, for example in error recovery, now 4136 make intermediate jumps to contexts where \code{on.exit()} actions 4137 are established instead of trying to run all \code{on.exit()} 4138 actions before jumping to the final target. This unwinds the stack 4139 gradually, releases resources held on the stack, and significantly 4140 reduces the chance of a segfault when running out of C stack 4141 space. Error handlers established using 4142 \code{withCallingHandlers()} and \code{options("error")} 4143 specifications are ignored when handling a C stack overflow error 4144 as attempting one of these would trigger a cascade of C stack 4145 overflow errors. (These changes resolve \PR{16753}.) 4146 4147 \item The spacing could be wrong when printing a complex array. 4148 (Report and patch by Lukas Stadler.) 4149 4150 \item \code{pretty(d, n, min.n, *)} for date-time objects \code{d} 4151 works again in border cases with large \code{min.n}, returns a 4152 \code{labels} attribute also for small-range dates and in such cases 4153 its returned length is closer to the desired \code{n}. (\PR{16761}) 4154 Additionally, it finally does cover the range of \code{d}, as it 4155 always claimed. 4156 4157 \item \code{tsp(x) <- NULL} did not handle correctly objects 4158 inheriting from both \code{"ts"} and \code{"mts"}. (\PR{16769}) 4159 4160 \item \code{install.packages()} could give false errors when 4161 \code{options("pkgType")} was \code{"binary"}. (Reported by 4162 Jose Claudio Faria.) 4163 4164 \item A bug fix in \R 3.0.2 fixed problems with \code{locator()} 4165 in X11, but introduced problems in Windows. Now both should be 4166 fixed. (\PR{15700}) 4167 4168 \item \code{download.file()} with \code{method = "wininet"} 4169 incorrectly warned of download file length difference when 4170 reported length was unknown. (\PR{16805}) 4171 4172 \item \code{diag(NULL, 1)} crashed because of missed type 4173 checking. (\PR{16853}) 4174 } 4175 } 4176} 4177 4178\section{\Rlogo CHANGES IN R 3.2.5}{ 4179 \subsection{BUG FIXES}{ 4180 \itemize{ 4181 \item \code{format.POSIXlt()} behaved incorrectly in \R 3.2.4. 4182 E.g.\sspace{}the output of 4183 \code{format(as.POSIXlt(paste0(1940:2000, "-01-01"), tz = "CET"), 4184 usetz = TRUE)} ended in two \code{"CEST"} time formats. 4185 } 4186 } 4187} 4188 4189\section{\Rlogo CHANGES IN R 3.2.4}{ 4190 \subsection{NEW FEATURES}{ 4191 \itemize{ 4192 \item \code{install.packages()} and related functions now give a 4193 more informative warning when an attempt is made to install a base 4194 package. 4195 4196 \item \code{summary(x)} now prints with less rounding when 4197 \code{x} contains infinite values. (Request of \PR{16620}.) 4198 4199 \item \code{provideDimnames()} gets an optional \code{unique} argument. 4200 4201 \item \code{shQuote()} gains \code{type = "cmd2"} for quoting 4202 in \command{cmd.exe} in Windows. (Response to \PR{16636}.) 4203 4204 \item The \code{data.frame} method of \code{rbind()} gains an 4205 optional argument \code{stringsAsFactors} (instead of only 4206 depending on \code{getOption("stringsAsFactors")}). 4207 4208 \item \code{smooth(x, *)} now also works for long vectors. 4209 4210 \item \code{tools::texi2dvi()} has a workaround for problems with 4211 the \command{texi2dvi} script supplied by \pkg{texinfo 6.1}. 4212 4213 It extracts more error messages from the LaTeX logs when in 4214 emulation mode. 4215 } 4216 } 4217 4218 \subsection{UTILITIES}{ 4219 \itemize{ 4220 \item \command{R CMD check} will leave a log file 4221 \file{build_vignettes.log} from the re-building of vignettes in 4222 the \file{.Rcheck} directory if there is a problem, and always if 4223 environment variable \env{_R_CHECK_ALWAYS_LOG_VIGNETTE_OUTPUT_} is 4224 set to a true value. 4225 } 4226 } 4227 4228 \subsection{DEPRECATED AND DEFUNCT}{ 4229 \itemize{ 4230 \item Use of \samp{SUPPORT_OPENMP} from header \file{Rconfig.h} is 4231 deprecated in favour of the standard OpenMP define \samp{_OPENMP}. 4232 4233 (This has been the recommendation in the manual for a while now.) 4234 4235 \item The \command{make} macro \code{AWK} which is long unused by 4236 \R itself but recorded in file \file{etc/Makeconf} is deprecated 4237 and will be removed in \R 3.3.0. 4238 4239 \item The C header file \file{S.h} is no longer documented: its 4240 use should be replaced by \file{R.h}. 4241 } 4242 } 4243 4244 \subsection{BUG FIXES}{ 4245 \itemize{ 4246 \item \code{kmeans(x, centers = <1-row>)} now works. (\PR{16623}) 4247 4248 \item \code{Vectorize()} now checks for clashes in argument names. 4249 (\PR{16577}) 4250 4251 \item \code{file.copy(overwrite = FALSE)} would signal a successful 4252 copy when none had taken place. (\PR{16576}) 4253 4254 \item \code{ngettext()} now uses the same default domain as 4255 \code{gettext()}. (\PR{14605}) 4256 4257 \item \code{array(.., dimnames = *)} now warns about 4258 non-\code{list} dimnames and, from \R 3.3.0, will signal the same 4259 error for invalid dimnames as \code{matrix()} has always done. 4260 4261 \item \code{addmargins()} now adds dimnames for the extended 4262 margins in all cases, as always documented. 4263 4264 \item \code{heatmap()} evaluated its \code{add.expr} argument 4265 in the wrong environment. (\PR{16583}) 4266 4267 \item \code{require()} etc now give the correct entry of 4268 \code{lib.loc} in the warning about an old version of a package 4269 masking a newer required one. 4270 4271 \item The internal deparser did not add parentheses when 4272 necessary, e.g. before \code{[]} or \code{[[]]}. (Reported by 4273 Lukas Stadler; additional fixes included as well). 4274 4275 \item \code{as.data.frame.vector(*, row.names=*)} no longer 4276 produces \sQuote{corrupted} data frames from row names of incorrect 4277 length, but rather warns about them. This will become an error. 4278 4279 \item \code{url} connections with \code{method = "libcurl"} are 4280 destroyed properly. (\PR{16681}) 4281 4282 \item \code{withCallingHandler()} now (again) handles warnings 4283 even during S4 generic's argument evaluation. (\PR{16111}) 4284 4285 \item \code{deparse(..., control = "quoteExpressions")} 4286 incorrectly quoted empty expressions. (\PR{16686}) 4287 4288 \item \code{format()}ting datetime objects (\code{"POSIX[cl]?t"}) 4289 could segfault or recycle wrongly. (\PR{16685}) 4290 4291 \item \code{plot.ts(<matrix>, las = 1)} now does use \code{las}. 4292 4293 \item \code{saveRDS(*, compress = "gzip")} now works as 4294 documented. (\PR{16653}) 4295 4296 \item (Windows only) The \command{Rgui} front end did not 4297 always initialize the console properly, and could cause 4298 \R to crash. (\PR{16698}) 4299 4300 \item \code{dummy.coef.lm()} now works in more cases, thanks to a 4301 proposal by Werner Stahel (\PR{16665}). In addition, it now works 4302 for multivariate linear models (\code{"mlm"}, \code{\link{manova}}) 4303 thanks to a proposal by Daniel Wollschlaeger. 4304 4305 \item The \code{as.hclust()} method for \code{"dendrogram"}s 4306 failed often when there were ties in the heights. 4307 4308 \item \code{reorder()} and \code{midcache.dendrogram()} now are 4309 non-recursive and hence applicable to somewhat deeply nested 4310 dendrograms, thanks to a proposal by Suharto Anggono in \PR{16424}. 4311 4312 \item \code{cor.test()} now calculates very small p values 4313 more accurately (affecting the result only in extreme not 4314 statistically relevant cases). (\PR{16704}) 4315 4316 \item \code{smooth(*, do.ends=TRUE)} did not always work correctly 4317 in \R versions between 3.0.0 and 3.2.3. 4318 4319 \item \code{pretty(D)} for date-time objects \code{D} now also 4320 works well if \code{range(D)} is (much) smaller than a second. In 4321 the case of only one unique value in \code{D}, the pretty range 4322 now is more symmetric around that value than previously. 4323 \cr 4324 Similarly, \code{pretty(dt)} no longer returns a length 5 vector 4325 with duplicated entries for \code{Date} objects \code{dt} which 4326 span only a few days. 4327 4328 \item The figures in help pages such as \code{?points} were 4329 accidentally damaged, and did not appear in \R 3.2.3. 4330 (\PR{16708}) 4331 4332 \item \code{available.packages()} sometimes deleted the wrong 4333 file when cleaning up temporary files. (\PR{16712}) 4334 4335 \item The \code{X11()} device sometimes froze on Red Hat 4336 Enterprise Linux 6. It now waits for \code{MapNotify} events 4337 instead of \code{Expose} events, thanks to Siteshwar 4338 Vashisht. (\PR{16497}) 4339 4340 \item \code{[dpqr]nbinom(*, size=Inf, mu=.)} now works as limit 4341 case, for \sQuote{dpq} as the Poisson. (\PR{16727})\cr 4342 \code{pnbinom()} no longer loops infinitely in border cases. 4343 4344 \item \code{approxfun(*, method="constant")} and hence \code{ecdf()} 4345 which calls the former now correctly \dQuote{predict} \code{NaN} 4346 values as \code{NaN}. 4347 4348 \item \code{summary.data.frame()} now displays \code{NA}s in 4349 \code{Date} columns in all cases. (\PR{16709}) 4350 } 4351 } 4352} 4353 4354\section{\Rlogo CHANGES IN R 3.2.3}{ 4355 \subsection{NEW FEATURES}{ 4356 \itemize{ 4357 \item Some recently-added Windows time zone names have been added 4358 to the conversion table used to convert these to Olson names. 4359 (Including those relating to changes for Russia in Oct 2014, as in 4360 \PR{16503}.) 4361 4362 \item (Windows) Compatibility information has been added to the 4363 manifests for \file{Rgui.exe}, \file{Rterm.exe} and 4364 \file{Rscript.exe}. This should allow \code{win.version()} and 4365 \code{Sys.info()} to report the actual Windows version up to 4366 Windows 10. 4367 4368 \item Windows \code{"wininet"} FTP first tries EPSV / PASV mode 4369 rather than only using active mode (reported by Dan Tenenbaum). 4370 %% https://stat.ethz.ch/pipermail/r-devel/2015-August/071595.html 4371 4372 \item \code{which.min(x)} and \code{which.max(x)} may be much 4373 faster for logical and integer \code{x} and now also work for long 4374 vectors. 4375 4376 \item The \sQuote{emulation} part of \code{tools::texi2dvi()} has 4377 been somewhat enhanced, including supporting \code{quiet = TRUE}. 4378 It can be selected by \code{texi2dvi = "emulation"}. 4379 4380 (Windows) MiKTeX removed its \code{texi2dvi.exe} command in Sept 4381 2015: \code{tools::texi2dvi()} tries \code{texify.exe} if it is 4382 not found. 4383 4384 \item (Windows only) Shortcuts for printing and saving have 4385 been added to menus in \command{Rgui.exe}. (Request of \PR{16572}.) 4386 4387 \item \code{loess(..., iterTrace=TRUE)} now provides diagnostics 4388 for robustness iterations, and the \code{print()} method for 4389 \code{summary(<loess>)} shows slightly more. 4390 4391 \item The included version of PCRE has been updated to 8.38, a 4392 bug-fix release. 4393 4394 \item \code{View()} now displays nested data frames in a more 4395 friendly way. (Request with patch in \PR{15915}.) 4396 } 4397 } 4398 4399 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 4400 \itemize{ 4401 \item The included configuration code for \code{libintl} has been 4402 updated to that from \code{gettext} version 0.19.5.1 --- this 4403 should only affect how an external library is detected (and the 4404 only known instance is under OpenBSD). (Wish of \PR{16464}.) 4405 4406 \item \command{configure} has a new argument 4407 \option{--disable-java} to disable the checks for Java. 4408 4409 \item The \command{configure} default for \code{MAIN_LDFLAGS} has 4410 been changed for the FreeBSD, NetBSD and Hurd OSes to one more 4411 likely to work with compilers other than \command{gcc} (FreeBSD 10 4412 defaults to \command{clang}). 4413 4414 \item \command{configure} now supports the OpenMP flags 4415 \option{-fopenmp=libomp} (clang) and \option{-qopenmp} (Intel C). 4416 4417 \item Various macros can be set to override the default 4418 behaviour of \command{configure} when detecting OpenMP: see file 4419 \file{config.site}. 4420 4421 \item Source installation on Windows has been modified to allow 4422 for MiKTeX installations without \command{texi2dvi.exe}. See file 4423 \file{MkRules.dist}. 4424 } 4425 } 4426 4427 \subsection{BUG FIXES}{ 4428 \itemize{ 4429 \item \code{regexpr(pat, x, perl = TRUE)} with Python-style named 4430 capture did not work correctly when \code{x} contained \code{NA} 4431 strings. (\PR{16484}) 4432 4433 \item The description of dataset \code{ToothGrowth} has been 4434 improved/corrected. (\PR{15953}) 4435 4436 \item \code{model.tables(type = "means")} and hence 4437 \code{TukeyHSD()} now support \code{"aov"} fits without an 4438 intercept term. (\PR{16437}) 4439 4440 \item \code{close()} now reports the status of a \code{pipe()} 4441 connection opened with an explicit \code{open} argument. 4442 (\PR{16481}) 4443 4444 \item Coercing a list without names to a data frame is faster if 4445 the elements are very long. (\PR{16467}) 4446 4447 \item (Unix-only) Under some rare circumstances piping the output 4448 from \command{Rscript} or \command{R -f} could result in 4449 attempting to close the input file twice, possibly crashing the 4450 process. (\PR{16500}) 4451 4452 \item (Windows) \code{Sys.info()} was out of step with 4453 \code{win.version()} and did not report Windows 8. 4454 4455 \item \code{topenv(baseenv())} returns \code{baseenv()} again as 4456 in \R 3.1.0 and earlier. This also fixes \code{compilerJIT(3)} 4457 when used in \file{.Rprofile}. 4458 4459 \item \code{detach()}ing the \pkg{methods} package keeps 4460 \code{.isMethodsDispatchOn()} true, as long as the methods 4461 namespace is not unloaded.% This keeps a sane state, see the reg-S4 test 4462 4463 \item Removed some spurious warnings from \command{configure} about the 4464 preprocessor not finding header files. (\PR{15989}) 4465 4466 \item \code{rchisq(*, df=0, ncp=0)} now returns \code{0} instead 4467 of \code{NaN}, and \code{dchisq(*, df=0, ncp=*)} also no longer 4468 returns \code{NaN} in limit cases (where the limit is unique). 4469 (\PR{16521}) 4470 4471 \item \code{pchisq(*, df=0, ncp > 0, log.p=TRUE)} no longer 4472 underflows (for ncp > ~60). 4473 4474 \item \code{nchar(x, "w")} returned -1 for characters it did not 4475 know about (e.g.\sspace{}zero-width spaces): it now assumes 1. 4476 It now knows about most zero-width characters and a few more 4477 double-width characters. 4478 4479 \item Help for \code{which.min()} is now more precise about 4480 behavior with logical arguments. (\PR{16532}) 4481 4482 \item The print width of character strings marked as 4483 \code{"latin1"} or \code{"bytes"} was in some cases computed 4484 incorrectly. 4485 4486 \item \code{abbreviate()} did not give names to the return value 4487 if \code{minlength} was zero, unlike when it was positive. 4488 4489 \item (Windows only) \code{dir.create()} did not always warn 4490 when it failed to create a directory. (\PR{16537}) 4491 4492 \item When operating in a non-UTF-8 multibyte locale 4493 (e.g.\sspace{}an East Asian locale on Windows), \code{grep()} and 4494 related functions did not handle UTF-8 strings properly. 4495 (\PR{16264}) 4496 4497 \item \code{read.dcf()} sometimes misread lines longer than 8191 4498 characters. (Reported by Hervé Pagès with a patch.) 4499 4500 \item \code{within(df, ..)} no longer drops columns whose name 4501 start with a \code{"."}. 4502 4503 \item The built-in \code{HTTP} server converted entire 4504 \code{Content-Type} to lowercase including parameters which 4505 can cause issues for multi-part form boundaries (\PR{16541}). 4506 4507 \item Modifying slots of S4 objects could fail when the 4508 \pkg{methods} package was not attached. (\PR{16545}) 4509 4510 \item \code{splineDesign(*, outer.ok=TRUE)} (\pkg{splines}) is better now 4511 (\PR{16549}), and \code{interpSpline()} now allows \code{sparse=TRUE} 4512 for speedup with non-small sizes. 4513 4514 \item If the expression in the traceback was too long, 4515 \code{traceback()} did not report the source line number. (Patch 4516 by Kirill Müller.) 4517 4518 \item The browser did not truncate the display of the function when 4519 exiting with \code{options("deparse.max.lines")} set. 4520 (\PR{16581}) 4521 4522 \item When \code{bs(*, Boundary.knots=)} had boundary knots inside 4523 the data range, extrapolation was somewhat off. (Patch by Trevor 4524 Hastie.) 4525 4526 \item \code{var()} and hence \code{sd()} warn about 4527 \code{factor} arguments which are deprecated now. (\PR{16564}) 4528 4529 \item \code{loess(*, weights = *)} stored wrong weights and hence 4530 gave slightly wrong predictions for \code{newdata}. (\PR{16587}) 4531 4532 \item \code{aperm(a, *)} now preserves \code{names(dim(a))}. 4533 4534 \item \code{poly(x, ..)} now works when either \code{raw=TRUE} or 4535 \code{coef} is specified. (\PR{16597}) 4536 4537 \item \code{data(package=*)} is more careful in determining the path. 4538 4539 \item \code{prettyNum(*, decimal.mark, big.mark)}: fixed bug 4540 introduced when fixing \PR{16411}. 4541 } 4542 } 4543} 4544 4545\section{\Rlogo CHANGES IN R 3.2.2}{ 4546 \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{ 4547 \itemize{ 4548 \item It is now easier to use secure downloads from 4549 \samp{https://} URLs on builds which support them: no longer do 4550 non-default options need to be selected to do so. In particular, 4551 packages can be installed from repositories which offer 4552 \samp{https://} URLs, and those listed by \code{setRepositories()} 4553 now do so (for some of their mirrors). 4554 4555 Support for \samp{https://} URLs is available on Windows, and on 4556 other platforms if support for \code{libcurl} was compiled in and 4557 if that supports the \code{https} protocol (system installations 4558 can be expected to do). So \samp{https://} support can be 4559 expected except on rather old OSes (an example being OS X 4560 \sQuote{Snow Leopard}, where a non-system version of 4561 \code{libcurl} can be used). 4562 4563 (Windows only) The default method for accessing URLs \emph{via} 4564 \code{download.file()} and \code{url()} has been changed to be 4565 \code{"wininet"} using Windows API calls. This changes the way 4566 proxies need to be set and security settings made: there have been 4567 some reports of \samp{ftp:} sites being inaccessible under the new default 4568 method (but the previous methods remain available). 4569 } 4570 } 4571 4572 \subsection{NEW FEATURES}{ 4573 \itemize{ 4574 \item \code{cmdscale()} gets new option \code{list.} for increased 4575 flexibility when a list should be returned. 4576 4577 \item \command{configure} now supports \code{texinfo} version 6.0, 4578 which (unlike the change from 4.x to 5.0) is a minor update. 4579 (Wish of \PR{16456}.) 4580 4581 \item (Non-Windows only) \code{download.file()} with default 4582 \code{method = "auto"} now chooses \code{"libcurl"} if that is 4583 available and a \samp{https://} or \samp{ftps://} URL is used. 4584 4585 \item (Windows only) \code{setInternet2(TRUE)} is now the default. 4586 The command-line option \command{--internet2} and environment 4587 variable \env{R_WIN_INTERNET2} are now ignored. 4588 4589 Thus by default the \code{"internal"} method for 4590 \code{download.file()} and \code{url()} uses the \code{"wininet"} 4591 method: to revert to the previous default use 4592 \code{setInternet2(FALSE)}. 4593 4594 This means that \samp{https://} URLs can be read by default by 4595 \code{download.file()} (they have been readable by \code{file()} 4596 and \code{url()} since \R 3.2.0). 4597 4598 There are implications for how proxies need to be set (see 4599 \code{?download.file}). 4600 4601 \item \code{chooseCRANmirror()} and \code{chooseBioCmirror()} now 4602 offer HTTPS mirrors in preference to HTTP mirrors. This changes 4603 the interpretation of their \code{ind} arguments: see their help 4604 pages. 4605 4606 \item \code{capture.output()} gets optional arguments \code{type} 4607 and \code{split} to pass to \code{sink()}, and hence can be used to 4608 capture messages. 4609 } 4610 } 4611 4612 \subsection{C-LEVEL FACILITIES}{ 4613 \itemize{ 4614 \item Header \file{Rconfig.h} now defines \code{HAVE_ALLOCA_H} if 4615 the platform has the \file{alloca.h} header (it is needed to 4616 define \code{alloca} on Solaris and AIX, at least: see 4617 \sQuote{Writing R Extensions} for how to use it). 4618 } 4619 } 4620 4621 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 4622 \itemize{ 4623 \item The \command{libtool} script generated by 4624 \command{configure} has been modified to support FreeBSD >= 10 4625 (\PR{16410}). 4626 } 4627 } 4628 4629 \subsection{BUG FIXES}{ 4630 \itemize{ 4631 \item The HTML help page links to demo code failed due to a change 4632 in \R 3.2.0. (\PR{16432}) 4633 4634 \item If the \code{na.action} argument was used in 4635 \code{model.frame()}, the original data could be 4636 modified. (\PR{16436}) 4637 4638 \item \code{getGraphicsEvent()} could cause a crash if a graphics 4639 window was closed while it was in use. (\PR{16438}) 4640 4641 \item \code{matrix(x, nr, nc, byrow = TRUE)} failed if \code{x} 4642 was an object of type \code{"expression"}. 4643 4644 \item \code{strptime()} could overflow the allocated storage on 4645 the C stack when the timezone had a non-standard format much 4646 longer than the standard formats. (Part of \PR{16328}.) 4647 4648 \item \code{options(OutDec = s)} now signals a warning (which will 4649 become an error in the future) when \code{s} is not a string with 4650 exactly one character, as that has been a documented requirement. 4651 4652 \item \code{prettyNum()} gains a new option \code{input.d.mark} 4653 which together with other changes, e.g., the default for 4654 \code{decimal.mark}, fixes some \code{format()}ting variants with 4655 non-default \code{getOption("OutDec")} such as in \PR{16411}. 4656 4657 \item \code{download.packages()} failed for \code{type} equal to 4658 either \code{"both"} or \code{"binary"}. (Reported by Dan 4659 Tenenbaum.) 4660 4661 \item The \code{dendrogram} method of \code{labels()} is much more 4662 efficient for large dendrograms, now using \code{rapply()}. 4663 (Comment #15 of \PR{15215}) 4664 4665 \item The \code{"port"} algorithm of \code{nls()} could give 4666 spurious errors. (Reported by Radford Neal.) 4667 4668 \item Reference classes that inherited from reference classes in 4669 another package could invalidate methods of the inherited 4670 class. Fixing this requires adding the ability for methods to be 4671 \dQuote{external}, with the object supplied explicitly as the first 4672 argument, named \code{.self}. See "Inter-Package Superclasses" 4673 in the documentation. 4674 4675 \item \code{readBin()} could fail on the SPARC architecture 4676 due to alignment issues. (Reported by Radford Neal.) 4677 4678 \item \code{qt(*, df=Inf, ncp=.)} now uses the natural 4679 \code{qnorm()} limit instead of returning \code{NaN}. (\PR{16475}) 4680 4681 \item Auto-printing of S3 and S4 values now searches for 4682 \code{print()} in the base namespace and \code{show()} in the 4683 \pkg{methods} namespace instead of searching the global 4684 environment. 4685 4686 \item \code{polym()} gains a \code{coefs = NULL} argument and 4687 returns class \code{"poly"} just like \code{poly()} which gets a 4688 new \code{simple=FALSE} option. They now lead to correct 4689 \code{predict()}ions, e.g., on subsets of the original data. 4690 (\PR{16239}) 4691 4692 \item \code{rhyper(nn, <large>)} now works correctly. (\PR{16489}) 4693 4694 \item \code{ttkimage()} did not (and could not) work so was 4695 removed. Ditto for \code{tkimage.cget()} and 4696 \code{tkimage.configure()}. Added two Ttk widgets and missing 4697 subcommands for Tk's \code{image} command: 4698 \code{ttkscale()}, 4699 \code{ttkspinbox()}, 4700 \code{tkimage.delete()}, 4701 \code{tkimage.height()}, 4702 \code{tkimage.inuse()}, 4703 \code{tkimage.type()}, 4704 \code{tkimage.types()}, 4705 \code{tkimage.width()}. (\PR{15372}, \PR{16450}) 4706 4707 \item \code{getClass("foo")} now also returns a class definition when it is 4708 found in the cache more than once. 4709 } 4710 } 4711} 4712 4713\section{\Rlogo CHANGES IN R 3.2.1}{ 4714 \subsection{NEW FEATURES}{ 4715 \itemize{ 4716 \item \code{utf8ToInt()} now checks that its input is valid UTF-8 4717 and returns \code{NA} if it is not. 4718 4719 \item \code{install.packages()} now allows \code{type = "both"} 4720 with \code{repos = NULL} if it can infer the type of file. 4721 4722 \item \code{nchar(x, *)} and \code{nzchar(x)} gain a new argument 4723 \code{keepNA} which governs how the result for \code{NA}s in 4724 \code{x} is determined. For \code{nzchar()} in general and 4725 \code{nchar()} in the \R 3.2.x series, the default 4726 remains \code{FALSE} which is fully back compatible. 4727 From \R 3.3.0, \code{nchar()}'s default will change to 4728 \code{keepNA = NA} and you are advised to consider this for code 4729 portability. 4730 4731 \item \code{news()} more flexibly extracts dates from package 4732 \file{NEWS.Rd} files. 4733 4734 \item \code{lengths(x)} now also works (trivially) for atomic 4735 \code{x} and hence can be used more generally as an efficient 4736 replacement of \code{sapply(x, length)} and similar. 4737 4738 \item The included version of PCRE has been updated to 8.37, a 4739 bug-fix release. 4740 4741 \item \code{diag()} no longer duplicates a matrix when extracting 4742 its diagonal. 4743 4744 \item \code{as.character.srcref()} gains an argument to allow 4745 characters corresponding to a range of source references to be 4746 extracted. 4747 } 4748 } 4749 4750 \subsection{BUG FIXES}{ 4751 \itemize{ 4752 \item \code{acf()} and \code{ccf()} now guarantee values strictly 4753 in \eqn{[-1,1]} (instead of sometimes very slightly outside). \PR{15832}. 4754 4755 \item \code{as.integer("111111111111")} now gives NA (with a warning) as 4756 it does for the corresponding numeric or negative number 4757 coercions. Further, \code{as.integer(M + 0.1)} now gives \code{M} 4758 (instead of NA) when M is the maximal representable integer. 4759 4760 \item On some platforms \code{nchar(x, "c")} and \code{nchar(x, "w")} 4761 would return values (possibly \code{NA}) for inputs which were 4762 declared to be UTF-8 but were not, or for invalid strings without a 4763 marked encoding in a multi-byte locale, rather than give an 4764 error. Additional checks have been added to mitigate this. 4765 4766 \item \code{apply(a, M, function(u) c(X = ., Y = .))} again 4767 has dimnames containing "X" and "Y" (as in R < 3.2.0). 4768 4769 \item (Windows only) In some cases, the \command{--clean} option 4770 to \command{R CMD INSTALL} could fail. (\PR{16178}) 4771 4772 \item (Windows only) \code{choose.files()} would occasionally 4773 include characters from the result of an earlier call in 4774 the result of a later one. (\PR{16270}) 4775 4776 \item A change in \code{RSiteSearch()} in \R 3.2.0 caused it to 4777 submit invalid URLs. (\PR{16329}) 4778 4779 \item \command{Rscript} and command line \command{R} silently 4780 ignored incomplete statements at the end of a script; now they 4781 are reported as parse errors. (\PR{16350}) 4782 4783 \item Parse data for very long strings was not stored. (\PR{16354}) 4784 4785 \item \code{plotNode()}, the workhorse of the \code{plot} method 4786 for \code{"dendrogram"}s is no longer recursive, thanks to Suharto 4787 Anggono, and hence also works for deeply nested dendrograms. (\PR{15215}) 4788 4789 \item The parser could overflow internally when given numbers 4790 in scientific format with extremely large exponents. (\PR{16358}) 4791 4792 \item If the CRAN mirror was not set, \code{install.packages(type = "both")} 4793 and related functions could repeatedly query the user for it. 4794 (Part of \PR{16362}) 4795 4796 \item The low-level functions \code{.rowSums()} etc. did not 4797 check the length of their argument, so could segfault. (\PR{16367}) 4798 4799 \item The \code{quietly} argument of \code{library()} is now 4800 correctly propagated from \code{.getRequiredPackages2()}. 4801 4802 \item Under some circumstances using the internal PCRE when 4803 building \R from source would cause external libs such as 4804 \code{-llzma} to be omitted from the main link. 4805 4806 \item The .Primitive default methods of the logic operators, i.e., 4807 \code{!}, \code{&} and \code{|}, now give correct error messages 4808 when appropriate, e.g., for \code{`&`(TRUE)} or \code{`!`()}. 4809 (\PR{16385}) 4810 4811 \item \code{cummax(x)} now correctly propagates \code{NA}s also 4812 when \code{x} is of type \code{integer} and begins with an \code{NA}. 4813 4814 \item \code{summaryRprof()} could fail when the profile contained 4815 only two records. (\PR{16395}) 4816 4817 \item HTML vignettes opened using \code{vignette()} did not support 4818 links into the rest of the HTML help system. (Links worked properly 4819 when the vignette was opened using \code{browseVignettes()} or from 4820 within the help system.) 4821 4822 \item \code{arima(*, xreg = .)} (for \eqn{d \ge 1}{d >= 1}) 4823 computes estimated variances based on a the number of effective 4824 observations as in \R version 3.0.1 and earlier. (\PR{16278}) 4825 4826 \item \code{slotNames(.)} is now correct for \code{"signature"} 4827 objects (mostly used internally in \pkg{methods}). 4828 4829 \item On some systems, the first string comparison after 4830 a locale change would result in \code{NA}. 4831 } 4832 } 4833} 4834 4835\section{\Rlogo CHANGES IN R 3.2.0}{ 4836 \subsection{NEW FEATURES}{ 4837 \itemize{ 4838 \item \code{anyNA()} gains a \code{recursive} argument. 4839 4840 \item When \code{x} is missing and \code{names} is not false 4841 (including the default value), \code{Sys.getenv(x, names)} returns 4842 an object of class \code{"Dlist"} and hence prints tidily. 4843 4844 \item (Windows.) \code{shell()} no longer consults the 4845 environment variable \env{SHELL}: too many systems have been 4846 encountered where it was set incorrectly (usually to a path where 4847 software was compiled, not where it was installed). 4848 \env{R_SHELL}, the preferred way to select a non-default shell, 4849 can be used instead. 4850 4851 \item Some unusual arguments to \code{embedFonts()} can now be 4852 specified as character vectors, and the defaults have been changed 4853 accordingly. 4854 4855 \item Functions in the \code{Summary} group duplicate less. 4856 (\PR{15798}) 4857 4858 \item (Unix-alikes.) \code{system(cmd, input = )} now uses 4859 \sQuote{shell-execution-environment} redirection, which will be 4860 more natural if \code{cmd} is not a single command (but requires a 4861 POSIX-compliant shell). (Wish of \PR{15508}) 4862 4863 \item \code{read.fwf()} and \code{read.DIF()} gain a 4864 \code{fileEncoding} argument, for convenience. 4865 4866 \item Graphics devices can add attributes to their description in 4867 \code{.Device} and \code{.Devices}. Several of those included with 4868 \R use a \code{"filepath"} attribute. 4869 4870 \item \code{pmatch()} uses hashing in more cases and so is faster 4871 at the expense of using more memory. (\PR{15697}) 4872 4873 \item \code{pairs()} gains new arguments to select sets of 4874 variables to be plotted against each other. 4875 4876 \item \code{file.info(, extra_cols = FALSE)} allows a minimal set 4877 of columns to be computed on Unix-alikes: on some systems without 4878 properly-configured caching this can be significantly faster with 4879 large file lists. 4880 4881 \item New function \code{dir.exists()} in package \pkg{base} to 4882 test efficiently whether one or more paths exist and are 4883 directories. 4884 4885 \item \code{dput()} and friends gain new controls 4886 \samp{hexNumeric} and \samp{digits17} which output double and 4887 complex quantities as, respectively, binary fractions (exactly, 4888 see \code{sprintf("\%a")}) and as decimals with up to 17 4889 significant digits. 4890 4891 \item \code{save()}, \code{saveRDS()} and \code{serialize()} now 4892 support \code{ascii = NA} which writes ASCII files using 4893 \code{sprintf("\%a")} for double/complex quantities. This is 4894 read-compatible with \code{ascii = TRUE} but avoids 4895 binary->decimal->binary conversions with potential loss of 4896 precision. Unfortunately the Windows C runtime's lack of C99 4897 compliance means that the format cannot be read correctly there in 4898 \R before 3.1.2. 4899 4900 \item The default for \code{formatC(decimal.mark =)} has been 4901 changed to be \code{getOption("OutDec")}; this makes it more 4902 consistent with \code{format()} and suitable for use in print 4903 methods, e.g.\sspace{}those for classes \code{"density"}, \code{"ecdf"}, 4904 \code{"stepfun"} and \code{"summary.lm"}. 4905 4906 \code{getOption("OutDec")} is now consulted by the print method 4907 for class \code{"kmeans"}, by \code{cut()}, \code{dendrogram()}, 4908 \code{plot.ts()} and \code{quantile()} when constructing labels 4909 and for the report from \code{legend(trace = TRUE)}. 4910 4911 (In part, wish of \PR{15819}.) 4912 4913 \item \code{printNum()} and hence \code{format()} and 4914 \code{formatC()} give a warning if \code{big.mark} and 4915 \code{decimal.mark} are set to the same value (period and comma 4916 are not uncommonly used for each, and this is a check that 4917 conventions have not got mixed). 4918 4919 \item \code{merge()} can create a result which uses long vectors 4920 on 64-bit platforms. 4921 4922 \item \code{dget()} gains a new argument \code{keep.source} which 4923 defaults to \code{FALSE} for speed (\code{dput()} and 4924 \code{dget()} are most often used for data objects where this can 4925 make \code{dget()} many times faster). 4926 4927 \item Packages may now use a file of common macro definitions in 4928 their help files, and may import definitions from other packages. 4929 4930 \item A number of macros have been added in the new 4931 \file{share/Rd} directory for use in package overview help pages, 4932 and \code{promptPackage()} now makes use of them. 4933 4934 \item \code{tools::parse_Rd()} gains a new \code{permissive} 4935 argument which converts unrecognized macros into text. This is 4936 used by \code{utils:::format.bibentry} to allow LaTeX markup to be 4937 ignored. 4938 4939 \item \code{options(OutDec =)} can now specify a multi-byte 4940 character, e.g., \code{options(OutDec = "\u00b7")} in a UTF-8 4941 locale. 4942 4943 \item \code{is.recursive(x)} is no longer true when \code{x} is an 4944 external pointer, a weak reference or byte code; the first enables 4945 \code{all.equal(x, x)} when \code{x <- getClass(.)}. 4946 4947 \item \code{ls()} (aka \code{objects()}) and 4948 \code{as.list.environment()} gain a new argument \code{sorted}. 4949 4950 \item The \code{"source"} attribute (which has not been added to 4951 functions by \R since before \R version 2.14.0) is no longer 4952 treated as special. 4953 4954 \item Function \code{returnValue()} has been added to give 4955 \code{on.exit()} code access to a function's return value for 4956 debugging purposes. 4957 4958 \item \code{crossprod(x, y)} allows more matrix coercions when 4959 \code{x} or \code{y} are vectors, now equalling 4960 \code{t(x) \%*\% y} in these cases (also reported by Radford Neal). 4961 Similarly, \code{tcrossprod(x,y)} and \code{\%*\%} work in more 4962 cases with vector arguments. 4963 4964 \item Utility function \code{dynGet()} useful for detecting 4965 cycles, aka infinite recursions. 4966 4967 \item The byte-code compiler and interpreter include new 4968 instructions that allow many scalar subsetting and assignment and 4969 scalar arithmetic operations to be handled more efficiently. This 4970 can result in significant performance improvements in scalar 4971 numerical code. 4972 4973 \item \code{apply(m, 2, identity)} is now the same as the matrix 4974 \code{m} when it has \emph{named} row names. 4975 4976 \item A new function \code{debuggingState()} has been added, 4977 allowing to temporarily turn off debugging. 4978 4979 \item \code{example()} gets a new optional argument 4980 \code{run.donttest} and \code{tools::Rd2ex()} a corresponding 4981 \code{commentDonttest}, with a default such that 4982 \code{example(..)} in help examples will run \code{\\donttest} 4983 code only if used interactively (a change in behaviour). 4984 4985 \item \code{rbind.data.frame()} gains an optional argument 4986 \code{make.row.names}, for potential speedup. 4987 4988 \item New function \code{extSoftVersion()} to report on the 4989 versions of third-party software in use in this session. 4990 Currently reports versions of \code{zlib}, \code{bzlib}, the 4991 \code{liblzma} from \code{xz}, PCRE, ICU, TRE and the \code{iconv} 4992 implementation. 4993 4994 A similar function \code{grSoftVersion()} in package \pkg{grDevices} 4995 reports on third-party graphics software. 4996 4997 Function \code{tcltk::tclVersion()} reports the Tcl/Tk version. 4998 4999 \item Calling \code{callGeneric()} without arguments now works 5000 with primitive generics to some extent. 5001 5002 \item \code{vapply(x, FUN, FUN.VALUE)} is more efficient notably 5003 for large \code{length(FUN.VALUE)}; as extension of \PR{16061}. 5004 5005 \item \code{as.table()} now allows tables with one or more 5006 dimensions of length 0 (such as \code{as.table(integer())}). 5007 5008 \item \code{names(x) <- NULL} now clears the names of call 5009 and \code{\dots} objects. 5010 5011 \item \code{library()} will report a warning when an insufficient 5012 dependency version is masking a sufficient one later on the 5013 library search path. 5014 5015 \item A new \code{plot()} method for class \code{"raster"} has 5016 been added. 5017 5018 \item New \code{check_packages_in_dir_changes()} function in 5019 package \pkg{tools} for conveniently analyzing how changing 5020 sources impacts the check results of their reverse dependencies. 5021 5022 \item Speed-up from Peter Haverty for \code{ls()} and 5023 \code{methods:::.requirePackage()} speeding up package loading. 5024 (\PR{16133}) 5025 5026 \item New \code{get0()} function, combining \code{exists()} and 5027 \code{get()} in one call, for efficiency. 5028 5029 \item \code{match.call()} gains an \code{envir} argument for 5030 specifying the environment from which to retrieve 5031 the \code{\dots} in the call, if any; this environment was wrong 5032 (or at least undesirable) when the \code{definition} argument was 5033 a function. 5034 5035 \item \code{topenv()} has been made \code{.Internal()} for 5036 speedup, based on Peter Haverty's proposal in \PR{16140}. 5037 5038 \item \code{getOption()} no longer calls \code{options()} in the main 5039 case. 5040 5041 \item Optional use of \code{libcurl} (version 7.28.0 from Oct 2012 5042 or later) for Internet access: 5043 \itemize{ 5044 \item \code{capabilities("libcurl")} reports if this is 5045 available. 5046 5047 \item \code{libcurlVersion()} reports the version in use, and 5048 other details of the \code{"libcurl"} build including which URL 5049 schemes it supports. 5050 5051 \item \code{curlGetHeaders()} retrieves the headers for 5052 \samp{http://}, \samp{https://}, \samp{ftp://} and 5053 \samp{ftps://} URLs: analysis of these headers can provide 5054 insights into the `existence' of a URL (it might for example be 5055 permanently redirected) and is so used in \command{R CMD 5056 check --as-cran}. 5057 5058 \item \code{download.file()} has a new optional method 5059 \code{"libcurl"} which will handle more URL schemes, follow 5060 redirections, and allows simultaneous downloads of multiple 5061 URLs. 5062 5063 \item \code{url()} has a new method \code{"libcurl"} which 5064 handles more URL schemes and follows redirections. The default 5065 method is controlled by a new option \code{url.method}, which 5066 applies also to the opening of URLs \emph{via} \code{file()} 5067 (which happens implicitly in functions such as 5068 \code{read.table}.) 5069 5070 \item When \code{file()} or \code{url()} is invoked with a 5071 \code{https://} or \code{ftps://} URL which the current method 5072 cannot handle, it switches to a suitable method if one is 5073 available. 5074 } 5075 5076 \item (Windows.) The DLLs \file{internet.dll} and 5077 \file{internet2.dll} have been merged. In this version it is safe 5078 to switch (repeatedly) between the internal and Windows internet 5079 functions within an \R session. 5080 5081 The Windows internet functions are still selected by flag 5082 \option{--internet2} or \code{setInternet2()}. This can be 5083 overridden for an \code{url()} connection \emph{via} its new 5084 \code{method} argument. 5085 5086 \code{download.file()} has new method \code{"wininet"}, selected 5087 as the default by \option{--internet2} or \code{setInternet2()}. 5088 5089 \item \code{parent.env<-} can no longer modify the parent of a 5090 locked namespace or namespace imports environment. Contributed by 5091 Karl Millar. 5092 5093 \item New function \code{isNamespaceLoaded()} for readability and speed. 5094 5095 \item \code{names(env)} now returns all the object names of an 5096 \code{environment} \code{env}, equivalently to 5097 \code{ls(env, all.names = TRUE, sorted = FALSE)} and also to 5098 the names of the corresponding list, 5099 \code{names(as.list(env, all.names = TRUE))}. 5100 Note that although \code{names()} returns a character vector, the 5101 names have no particular ordering. 5102 5103 \item The memory manager now grows the heap more aggressively. This 5104 reduces the number of garbage collections, in particular while 5105 data or code are loaded, at the expense of slightly increasing the 5106 memory footprint. 5107 5108 \item New function \code{trimws()} for removing leading/trailing 5109 whitespace. 5110 5111 \item \code{cbind()} and \code{rbind()} now consider S4 inheritance 5112 during S3 dispatch and also obey \code{deparse.level}. 5113 5114 \item \code{cbind()} and \code{rbind()} will delegate recursively 5115 to \code{methods::cbind2} (\code{methods::rbind2}) when at least 5116 one argument is an S4 object and S3 dispatch fails (due to 5117 ambiguity). 5118 5119 \item (Windows.) \code{download.file(quiet = FALSE)} now uses 5120 text rather than Windows progress bars in non-interactive use. 5121 5122 \item New function \code{hsearch_db()} in package \pkg{utils} for 5123 building and retrieving the help search database used by 5124 \code{help.search()}, along with functions for inspecting the 5125 concepts and keywords in the help search database. 5126 5127 \item New function \code{.getNamespaceInfo()}, a no-check version 5128 of \code{getNamespaceInfo()} mostly for internal speedups. 5129 5130 \item The help search system now takes \samp{\keyword} entries in 5131 Rd files which are not standard keywords (as given in 5132 \file{KEYWORDS} in the \R documentation directory) as concepts. 5133 For standard keyword entries the corresponding descriptions are 5134 additionally taken as concepts. 5135 5136 \item New \code{lengths()} function for getting the lengths of all 5137 elements in a list. 5138 5139 \item New function \code{toTitleCase()} in package \pkg{tools}, 5140 tailored to package titles. 5141 5142 \item The matrix methods of \code{cbind()} and \code{rbind()} 5143 allow matrices as inputs which have \eqn{2^{31}}{2^31} or more 5144 elements. (For \code{cbind()}, wish of \PR{16198}.) 5145 5146 \item The default method of \code{image()} has an explicit check 5147 for a numeric or logical matrix (which was always required). 5148 5149 \item \code{URLencode()} will not by default encode further URLs 5150 which appear to be already encoded. 5151 5152 \item \code{BIC(mod)} and \code{BIC(mod, mod2)} now give non-NA 5153 numbers for \code{arima()} fitted models, as \code{nobs(mod)} now 5154 gives the number of \dQuote{used} observations for such models. 5155 This fixes \PR{16198}, quite differently than proposed there. 5156 5157 \item The \code{print()} methods for \code{"htest"}, 5158 \code{"pairwise.htest"} and \code{"power.htest"} objects now have 5159 a \code{digits} argument defaulting to (a function of) 5160 \code{getOption("digits")}, and influencing all printed numbers 5161 coherently. Unavoidably, this changes the display of such test 5162 results in some cases. 5163 5164 \item Code completion for namespaces now recognizes all loaded 5165 namespaces, rather than only the ones that are also attached. 5166 5167 \item The code completion mechanism can now be replaced by a 5168 user-specified completer function, for (temporary) situations 5169 where the usual code completion is inappropriate. 5170 5171 \item \code{unzip()} will now warn if it is able to detect truncation 5172 when unpacking a file of 4GB or more (related to \PR{16243}). 5173 5174 \item \code{methods()} reports S4 in addition to S3 methods; 5175 output is simplified when the \code{class} argument is 5176 used. \code{.S3methods()} and \code{methods::.S4methods()} report 5177 S3 and S4 methods separately. 5178 5179 \item Higher order functions such as the \code{apply} functions 5180 and \code{Reduce()} now force arguments to the functions they apply 5181 in order to eliminate undesirable interactions between lazy 5182 evaluation and variable capture in closures. This resolves 5183 \PR{16093}. 5184 } 5185 } 5186 5187 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 5188 \itemize{ 5189 \item The \code{\\donttest} sections of \R's help files can be 5190 tested by\cr 5191 \command{make check TEST_DONTTEST=TRUE} . 5192 5193 \item It is possible to request the use of system 5194 \command{valgrind} headers \emph{via} \command{configure} option 5195 \option{--with-system-valgrind-headers}: note the possible future 5196 incompatibility of such headers discussed in the 'R Installation 5197 and Administration' manual. (Wish of \PR{16068}.) 5198 5199 \item The included version of \code{liblzma} has been updated to 5200 \code{xz-utils} 5.0.7 (minor bug fixes from 5.0.5). 5201 5202 \item \command{configure} options \option{--with-system-zlib}, 5203 \option{--with-system-bzlib} and \option{--with-system-pcre} are 5204 now the default. For the time being there is fallback to the 5205 versions included in the \R sources if no system versions are 5206 found or (unlikely) if they are too old. 5207 5208 Linux users should check that the \code{-devel} or \code{-dev} 5209 versions of packages \pkg{zlib}, \pkg{bzip2}/\pkg{libbz2} and 5210 \pkg{pcre} as well as \pkg{xz-devel}/\pkg{liblzma-dev} (or 5211 similar names) are installed. 5212 5213 \item \command{configure} by default looks for the 5214 \command{texi2any} script from \pkg{texinfo} 5.1 or later, rather 5215 than the \command{makeinfo} program. (\command{makeinfo} is a 5216 link to the Perl script \command{texi2any} in \pkg{texinfo} 5.x.) 5217 5218 \item \command{R CMD INSTALL} gains an option 5219 \option{--built-timestamp=STAMP} allowing 100\% reproducible 5220 package building, thanks to Dirk Eddelbuettel. 5221 } 5222 } 5223 5224 \subsection{UTILITIES}{ 5225 \itemize{ 5226 \item There is support for testing the \code{\\dontrun} and 5227 \code{\\donttest} parts of examples in packages. 5228 5229 \code{tools::testInstalledPackage()} accepts new arguments 5230 \code{commentDontrun = FALSE} and \code{commentDonttest = FALSE}. 5231 5232 \command{R CMD check} gains options \option{--run-dontrun} and 5233 \option{--run-donttest}. 5234 5235 \item The \acronym{HTML} generated by \code{tools::Rd2HTML()} and 5236 \code{tools::toHTML()} methods is now 5237 \sQuote{\acronym{XHTML} 1.0 Strict}. 5238 5239 \item The \pkg{compiler} package's utility function 5240 \code{setCompilerOptions()} now returns the old values 5241 invisibly. The initial optimization level can also be set with the 5242 environment variable \env{R_COMPILER_OPTIMIZE}. 5243 5244 \item \command{R CMD build} adds a \samp{NeedsCompilation} field 5245 if one is not already present in the \file{DESCRIPTION} file. 5246 5247 \item \command{R CMD check} gains option \option{--test-dir} to 5248 specify an alternative set of tests to run. 5249 5250 \item \command{R CMD check} will now by default continue with 5251 testing after many types of errors, and will output a summary 5252 count of errors at the end if any have occurred. 5253 5254 \item \command{R CMD check} now checks that the \samp{Title} and 5255 \samp{Description} fields are correctly terminated. 5256 5257 \item \command{R CMD check --as-cran} now: 5258 \itemize{ 5259 \item checks a \file{README.md} file can be processed: this 5260 needs \command{pandoc} installed. 5261 5262 \item checks the existence and accessibility of URLs in the 5263 \file{DESCRIPTION}, \file{CITATION}, \file{NEWS.Rd} and 5264 \file{README.md} files and in the help files (provided the build 5265 has \code{libcurl} support). 5266 5267 \item reports non-ASCII characters in R source files when there 5268 is no package encoding declared in the \file{DESCRIPTION} file. 5269 5270 \item reports (apparent) S3 methods exported but not registered. 5271 5272 \item reports overwriting registered S3 methods from 5273 base/recommended packages. (Such methods are replaced in the 5274 affected package for the rest of the session, even if the 5275 replacing namespace is unloaded.) 5276 5277 \item reports if the \code{Title} field does not appear to be in 5278 title case (see \sQuote{Writing R Extensions}: there may be 5279 false positives, but note that technical words should be 5280 single-quoted and will then be accepted). 5281 } 5282 5283 Most of these checks can also be selected by environment 5284 variables: see the \sQuote{R Internals} manual. 5285 } 5286 } 5287 5288 \subsection{C-LEVEL FACILITIES}{ 5289 \itemize{ 5290 \item New C API utility \code{logspace_sum(logx[], n)}. 5291 5292 \item Entry points \code{rbinom_mu}, \code{rnbinom_mu} and 5293 \code{rmultinom} are remapped (by default) to \code{Rf_rbinom_mu} 5294 etc. This requires packages using them to be re-installed. 5295 5296 \item \code{.C(DUP = FALSE)} and \code{.Fortran(DUP = FALSE)} are 5297 now ignored, so arguments are duplicated if \code{DUP = TRUE} 5298 would do so. As their help has long said, \code{.Call()} is much 5299 preferred. 5300 5301 \item New entry point \code{R_allocLD}, like \code{R_alloc} but 5302 guaranteed to have sufficient alignment for \code{long double} 5303 pointers. 5304 5305 \item \code{isPairList()} now returns \code{TRUE} for DOTSXP. 5306 } 5307 } 5308 5309 \subsection{WINDOWS BUILD CHANGES}{ 5310 A number of changes to the Windows build system are in development. 5311 The following are currently in place. 5312 \itemize{ 5313 \item Installation using external binary distributions 5314 of \pkg{zlib}, \pkg{bzip2}, \pkg{liblzma}, \pkg{pcre}, 5315 \pkg{libpng}, \pkg{jpeglib} and \pkg{libtiff} is now required, 5316 and the build instructions have been revised. 5317 5318 \item A new \command{make} target \code{rsync-extsoft} has been 5319 added to obtain copies of the external libraries from 5320 \acronym{CRAN}. 5321 5322 \item Building the manuals now requires \command{texi2any} from 5323 \pkg{texinfo} 5.1 or later. \acronym{CRAN} binary builds include 5324 the manuals, but by default builds from source will not, and they 5325 will be accessed from \acronym{CRAN}. See the comments in 5326 \file{src/gnuwin32/MkRules.dist} for how to specify the location 5327 of \command{texi2any}. 5328 5329 \item (Windows) Changes have been made to support an experimental 5330 Windows toolchain based on GCC 4.9.2. The default toolchain 5331 continues to be based on GCC 4.6.3, as the new toolchain is not 5332 yet stable enough. A change to a new toolchain is expected during 5333 the R 3.2.x lifetime. 5334 } 5335 } 5336 5337 \subsection{PACKAGE INSTALLATION}{ 5338 \itemize{ 5339 \item (Windows) The use of macro \code{ZLIB_LIBS} in file 5340 \file{src/Makevars.win} (which has not been documented for a long 5341 time) now requires an external \file{libz.a} to be available (it is 5342 part of the \sQuote{goodies} used to compile Windows binary 5343 packages). It would be simpler to use \code{-lz} instead. 5344 5345 \item The default for option \code{pkgType} on platforms using 5346 binary packages is now \code{"both"}, so source packages will be 5347 tried if binary versions are not available or not up to date. 5348 5349 There are options for what \code{install.packages(type = "both")} 5350 (possibly called \emph{via} \code{update.packages()}) will do if 5351 compilation of a source package is desirable: see \code{?options} 5352 (under \pkg{utils}). 5353 5354 If you intend not to accept updates as source packages, you should 5355 use \code{update.packages(type = "binary")}. 5356 } 5357 } 5358 5359 \subsection{DEPRECATED AND DEFUNCT}{ 5360 \itemize{ 5361 \item \code{download.file(method = "lynx")} is defunct. 5362 5363 \item Building \R using the included versions of \code{zlib}, 5364 \code{bzip2}, \code{xz} and PCRE is deprecated: these are frozen 5365 (bar essential bug-fixes) and will be removed for \R 3.3.0. 5366 5367 \item The \command{configure} option 5368 \option{--with-valgrind-instrumentation=3} has been withdrawn, as 5369 it did not work with recent \command{valgrind} headers: it is now 5370 treated as level \code{2}. 5371 5372 \item The \code{MethodsList} class in package \pkg{methods} had 5373 been deprecated in \R 2.11.0 and is defunct now. Functions using 5374 it are defunct if they had been deprecated in \R 2.11.0, and are 5375 deprecated now, otherwise. 5376 } 5377 } 5378 5379 \subsection{BUG FIXES}{ 5380 \itemize{ 5381 \item Fixed two obscure bugs in pairlist subassignment, reported by 5382 Radford Neal as part of pqR issue 16. 5383 5384 \item Fixes for bugs in handling empty arguments and argument 5385 matching by name in \code{log()}. 5386 5387 \item \code{all.equal()} gains methods for \code{environment}s and 5388 \code{refClass}es. 5389 5390 \item \code{[<-} and \code{[[<-} gain S4 \code{data.frame} methods 5391 to avoid corruption of S4 class information by the S3 methods. 5392 5393 \item \code{callNextMethod()} should now work within a \code{.local} 5394 call when \code{\dots} is absent from \code{formals(.local)}. 5395 5396 \item \code{dput(pairlist(x))} generates a call to the 5397 \code{pairlist} constructor instead of the \code{list} 5398 constructor. 5399 5400 \item Fix \code{missing()} when arguments are propagated through 5401 \code{\dots} . (\PR{15707}) 5402 5403 \item \code{eigen(m)} now defaults to \code{symmetric = TRUE} even 5404 when the dimnames are asymmetric if the matrix is otherwise 5405 symmetric. (\PR{16151}) 5406 5407 \item Fix issues with forwarding \code{\dots} through 5408 \code{callGeneric()} and \code{callNextMethod()}. (\PR{16141}) 5409 5410 \item \code{callGeneric()} now works after a \code{callNextMethod()}. 5411 5412 \item Subclass information is kept consistent when replacing an 5413 ordinary S4 class with an \dQuote{old class} \emph{via} the 5414 \code{S4Class} argument to \code{setOldClass()}. Thus, for 5415 example, a \code{data.frame} is valid for a \code{list} argument 5416 in the signature, and a \code{factor} is valid for \code{vector} 5417 arguments. 5418 5419 \item In \code{qbeta()} the inversion of \code{pbeta()} is much 5420 more sophisticated. This works better in corner cases some of 5421 which failed completely previously (\PR{15755}), or were using 5422 too many iterations. 5423 5424 \item Auto-printing no longer duplicates objects when printing is 5425 dispatched to a method. 5426 5427 \item \code{kmeans(x, k)} would fail when \code{nrow(x) >= 42949673}. 5428 (Comment 6 of \PR{15364}) 5429 5430 \item \sQuote{Abbreviated} locale-specific day and month names 5431 could have been truncated in those rare locales where there are 5432 the same as the full names. 5433 5434 \item An irrelevant warning message from updating subclass 5435 information was silenced (the namespace would not be writable 5436 in this case). 5437 } 5438 } 5439} 5440 5441\section{\Rlogo CHANGES IN R 3.1.3}{ 5442 \subsection{NEW FEATURES}{ 5443 \itemize{ 5444 \item The internal method of \code{download.file()} can now handle 5445 files larger than 2GB on 32-bit builds which support such files 5446 (tested on 32-bit \R running on 64-bit Windows). 5447 5448 \item \code{kruskal.test()} warns on more types of suspicious input. 5449 5450 \item The \code{as.dendrogram()} method for \code{"hclust"} 5451 objects gains a \code{check} argument protecting against memory 5452 explosion for invalid inputs. 5453 5454 \item \code{capabilities()} has a new item \code{long.double} 5455 which indicates if the build uses a \code{long double} type which 5456 is longer than \code{double}. 5457 5458 \item \code{nlm()} no longer modifies the callback argument in 5459 place (a new vector is allocated for each invocation, which mimics 5460 the implicit duplication that occurred in R < 3.1.0); note that 5461 this is a change from the previously documented 5462 behavior. (\PR{15958}) 5463 5464 \item \code{icuSetCollate()} now accepts \code{locale = "ASCII"} 5465 which uses the basic C function \code{strcmp} and so collates 5466 strings byte-by-byte in numerical order. 5467 5468 \item \code{sessionInfo()} tries to report the OS version in use 5469 (not just that compiled under, and including details of Linux 5470 distributions). 5471 5472 \item \code{model.frame()} (used by \code{lm()} and many other 5473 modelling functions) now warns when it drops contrasts 5474 from factors. (Wish of \PR{16119}) 5475 5476 \item \code{install.packages()} and friends now accept the value 5477 \code{type = "binary"} as a synonym for the native binary type on 5478 the platform (if it has one). 5479 5480 \item Single source or binary files can be supplied for 5481 \code{install.packages(type = "both")} and the appropriate type 5482 and \code{repos = NULL} will be inferred. 5483 5484 \item New function \code{pcre_config()} to report on some of the 5485 configuration options of the version of PCRE in use. In 5486 particular, this reports if regular expressions using 5487 \samp{\p{xx}} are supported. 5488 5489 \item (Windows.) \code{download.file(cacheOK = FALSE)} is now 5490 supported when \file{internet2.dll} is used. 5491 5492 \item \code{browseURL()} has been updated to work with Firefox 5493 36.0 which has dropped support for the \option{-remote} interface. 5494 } 5495 } 5496 5497 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 5498 \itemize{ 5499 \item The included version of PCRE has been updated to 8.36. 5500 5501 \item \command{configure} accepts \samp{MAKEINFO=texi2any} as 5502 another way to ensure \pkg{texinfo} 5.x is used when both 5.x and 5503 4.x are installed. 5504 } 5505 } 5506 5507 \subsection{UTILITIES}{ 5508 \itemize{ 5509 \item \command{R CMD check} now checks the packages used in 5510 \code{\\donttest} sections of the examples are specified in the 5511 \file{DESCRIPTION} file. 5512 (These are needed to run the examples interactively.) 5513 5514 \item \command{R CMD check} checks for the undeclared use of GNU 5515 extensions in Makefiles, and for Makefiles with a missing final 5516 linefeed. 5517 5518 \command{R CMD build} will correct line endings in all Makefiles, 5519 not just those in the \file{src} directory. 5520 5521 \item \command{R CMD check} notes uses of \code{library()} and 5522 \code{require()} in package code: see the section 5523 \sQuote{Suggested packages} of \sQuote{Writing R Extensions} for 5524 good practice. 5525 } 5526 } 5527 \subsection{DEPRECATED AND DEFUNCT}{ 5528 \itemize{ 5529 \item The \command{configure} option 5530 \option{--with-valgrind-instrumentation=3} is deprecated and will 5531 be removed in \R 3.2.0. 5532 } 5533 } 5534 5535 \subsection{BUG FIXES}{ 5536 \itemize{ 5537 \item (Windows.) \command{Rscript.exe} was missing a 5538 manifest specifying the modern style for common controls (e.g., 5539 the download progress bar). 5540 5541 \item If a package had extra documentation files but no vignette, 5542 the HTML help system produced an empty index page. 5543 5544 \item The parser now gives an error if a null character is included 5545 in a string using Unicode escapes. (\PR{16046}) 5546 5547 \item \code{qr.Q()} failed on complex arguments due to 5548 pre-3.0(!) typo. (\PR{16054}) 5549 5550 \item \code{abs()} failed with named arguments when the argument 5551 was complex. (\PR{16047}) 5552 5553 \item \code{"noquote"} objects may now be used as columns in 5554 data frames. (\PR{15997}) 5555 5556 \item Some values with extremely long names were printed 5557 incorrectly. (\PR{15999}) 5558 5559 \item Extremely large exponents on zero expressed in scientific 5560 notation (e.g. \code{0.0e50000}) could give \code{NaN}. (\PR{15976}) 5561 5562 \item \code{download.file()} reported downloaded sizes as 0KB if 5563 less than 1MB, only for \R 3.1.2 and only on big-endian platforms. 5564 5565 \item \code{prompt()} did not escape percent signs in the 5566 automatically generated usage section of help files. 5567 5568 \item \code{drop.terms()} dropped some of the attributes of the 5569 object it was working with. (\PR{16029}) 5570 5571 \item (Windows.) The command completion in \command{Rgui.exe} 5572 messed up the console. (\PR{15791}) 5573 5574 \item (Windows.) The \code{choose.files()} command returned a 5575 blank string when the user asked for a single file but cancelled 5576 the request. (\PR{16074}) 5577 5578 \item \code{Math2} S4 group generics failed to correctly dispatch 5579 \code{"structure"}- and \code{"nonStructure"}-derived classes. 5580 5581 \item \code{loadNamespace()} imposed undocumented restrictions 5582 on the \code{versionCheck} parameter. (Reported by Geoff Lee.) 5583 5584 \item Rare over-runs detected by AddressSanitizer in 5585 \code{substr()} and its replacement version have been avoided. 5586 5587 \emph{Inter alia} that fix gives the documented behaviour for 5588 \code{substr(x, 1, 2) <- ""} (subsequently reported as 5589 \PR{16214}). 5590 5591 \item Loading packages incorrectly defining an S4 generic followed 5592 by a function of the same name caused an erroneous cyclic 5593 namespace dependency error. 5594 5595 \item Declared vignette encodings are now always passed to the 5596 vignette engine. 5597 5598 \item Port Tomas Kalibera's fix from R-devel that restores the 5599 \code{loadMethod()} fast path, effectively doubling the speed of 5600 S4 dispatch. 5601 5602 \item \code{power.t.test()} and \code{power.prop.test()} now make 5603 use of the \code{extendInt} option of \code{uniroot()} and hence 5604 work in more extreme cases. (\PR{15792}) 5605 5606 \item If a package was updated and attached when its namespace was 5607 already loaded, it could end up with parts from one version and 5608 parts from the other. (\PR{16120}) 5609 5610 \item \code{tools:::.Rdconv()} didn't accept \code{--encoding=} due 5611 to a typo. (\PR{16121}) 5612 5613 \item Unix-alike builds without a suitable \command{makeinfo} were 5614 documented to link the missing HTML manuals to CRAN, but did not. 5615 5616 \item \code{save(*, ascii=TRUE)} and \code{load()} now correctly 5617 deal with \code{NaN}'s. (\PR{16137}) 5618 5619 \item \code{split.Date()} retains fractional representations while 5620 avoiding incomplete class propagation. 5621 5622 \item \file{R_ext/Lapack.h} had not been updated for changes made 5623 by LAPACK to the argument lists of its (largely internal) 5624 functions \code{dlaed2} and \code{dlaed3}. (\PR{16157}) 5625 5626 \item \code{RShowDoc("NEWS", "txt")} had not been updated for the 5627 layout changes of \R 3.1.0. 5628 5629 \item The \code{xtfrm()} method for class \code{"Surv"} has been 5630 corrected and its description expanded. 5631 5632 \item \code{mode(x) <- y} would incorrectly evaluate \code{x} before 5633 changing its mode. (\PR{16215}) 5634 5635 \item \code{besselJ(1, 2^64)} and \code{besselY(..)} now signal a 5636 warning, returning \code{NaN} instead of typically 5637 segfaulting. (Issue 3 of \PR{15554}) 5638 5639 \item HTML conversion of \samp{\href} markup in \file{.Rd} files 5640 did not remove the backslash from \samp{\\\%} and so gave an 5641 invalid URL. In a related change, the \samp{\\} escape is now 5642 required in such URLs. 5643 } 5644 } 5645} 5646 5647\section{\Rlogo CHANGES IN R 3.1.2}{ 5648 \subsection{NEW FEATURES}{ 5649 \itemize{ 5650 \item \code{embedFonts()} now defaults to 5651 \code{format = "ps2write"} for \file{.ps} and \file{.eps} files. 5652 This is available in Ghostscript 9.x (since 2010) whereas the 5653 previous default, \code{format = "pswrite"}, was removed in 5654 Ghostscript 9.10. 5655 5656 \item For consistency with \code{[dpqr]norm()}, 5657 \code{[dp]lnorm(sdlog = 0)} model a point mass at 5658 \code{exp(mulog)} rather than return \code{NaN} (for an error). 5659 5660 \item \code{capabilities()} now reports if ICU is compiled in for 5661 use for collation (it is only actually used if a suitable locale 5662 is set for collation, and never for a \code{C} locale). 5663 5664 \item (OS X only.) Package \pkg{tcltk} checks when loaded if it is 5665 linked against the CRAN X11-based Tcl/Tk and if so that the Tcl/Tk 5666 component and the X11 libraries are installed. This allows more 5667 informative error messages to be given advising the installation 5668 of the missing component or of XQuartz. 5669 5670 The \code{X11()} device and X11-based versions of the data editor 5671 and viewer (invoked by \code{edit()} and \code{View()} for data 5672 frames and matrices from command-line \R) check that the X11 5673 libraries are installed and if not advises installing XQuartz. 5674 5675 \item \code{icuSetCollate()} allows \code{locale = "default"}, and 5676 \code{locale = "none"} to use OS services rather than ICU for 5677 collation. 5678 5679 Environment variable \env{R_ICU_LOCALE} can be used to set the 5680 default ICU locale, in case the one derived from the OS locale is 5681 inappropriate (this is currently necessary on Windows). 5682 5683 \item New function \code{icuGetCollate()} to report on the ICU 5684 collation locale in use (if any). 5685 5686 \item \code{utils::URLencode()} was updated to use unreserved and 5687 reserved characters from RFC 3986 5688 (\url{http://tools.ietf.org/html/rfc3986}) instead of RFC 1738. 5689 5690 \item \code{unique(warnings())} and \code{c(warnings())} are now 5691 supported. 5692 5693 \item The Bioconductor \sQuote{version} used by 5694 \code{setRepositories()} now defaults to \code{3.0}. (It can be 5695 set at runtime \emph{via} environment variable 5696 \env{R_BIOC_VERSION}.) 5697 5698 \item Omegahat is no longer listed as providing Windows binary 5699 packages, e.g. by \code{setRepositories()}. It has no binary 5700 packages available for \R 3.1.x and those for earlier versions 5701 were 32-bit only. 5702 } 5703 } 5704 5705 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 5706 \itemize{ 5707 \item The \command{configure} script reports on the more important 5708 capabilities/options which will not be compiled in. 5709 5710 More types of external BLAS are recognized by name in that report. 5711 5712 \item When building \R as a shared library, the 5713 \option{-L${R_HOME}/lib${R_ARCH}} flag is placed earlier in the 5714 link commands used during installation and when packages are 5715 installed: this helps ensure that the current build has priority 5716 if an \R shared library has already been installed by 5717 e.g.\sspace{}\command{install-libR} in a library mentioned in 5718 \env{LDFLAGS} (and not in \sQuote{your system's library directory} 5719 as documented). (Wish of \PR{15790}.) 5720 5721 \item LaTeX package \pkg{upquote} is no longer required for \R's 5722 use of \pkg{inconsolata}. 5723 5724 \item (Windows only) If both 32- and 64-bit versions of \R are 5725 installed, the \file{bin/R.exe} and \file{bin/Rscript.exe} executables 5726 now run 64-bit \R. (To run 32-bit \R, overwrite these files 5727 with copies of \file{bin/i386/Rfe.exe}.) 5728 } 5729 } 5730 5731 \subsection{UTILITIES}{ 5732 \itemize{ 5733 \item Running \command{R CMD check} with 5734 \env{_R_CHECK_DEPENDS_ONLY_} true now makes the 5735 \samp{VignetteBuilder} packages available even if they are 5736 listed in \samp{Suggests}, since they are needed to recognise and 5737 process non-Sweave vignettes. 5738 5739 \item \command{R CMD check} now reports empty \code{importFrom} 5740 declarations in a \file{NAMESPACE} file, as these are common 5741 errors (writing \code{importFrom(\var{Pkg})} where 5742 \code{import(\var{Pkg})} was intended). 5743 5744 \item \command{R CMD check} now by default checks code usage 5745 directly on the package namespace without loading and attaching 5746 the package and its suggests and enhances. For good practice with 5747 packages in the \samp{Suggests} field, see §1.1.3.1 of 5748 \sQuote{Writing R Extensions}. For use of lazy-data objects in 5749 the package's own code, see \code{?data}. 5750 } 5751 } 5752 5753 \subsection{BUG FIXES}{ 5754 \itemize{ 5755 \item \code{dmultinom()} did not handle non-finite probabilities 5756 correctly. 5757 5758 \item \code{prettyNum(x, zero.print=*)} now also works when 5759 \code{x} contains \code{NA}s. 5760 5761 \item A longstanding bug exhibited by \code{nlminb()} on Windows 5762 was traced to a compiler bug in gcc 4.6.3; a workaround has been 5763 put in place. (\PR{15244} and \PR{15914}). 5764 5765 \item Rendering of \code{\\command} in HTML versions of help pages 5766 has been improved: this is particularly evident on the help page 5767 for \code{INSTALL}. 5768 5769 \item \code{as.hexmode(x)} and \code{as.octmode(x)} now behave 5770 correctly for some numeric \code{x}, e.g., \code{c(NA, 1)} or 5771 \code{c(1, pi)}. 5772 5773 \item \code{drop1()} failed if the \code{scope} argument had 5774 no variables to drop. (\PR{15935}) 5775 5776 \item \code{edit()} (and hence \code{fix()}) failed if 5777 an object had a non-character attribute named \code{"source"} 5778 (an attribute that had been used in \R prior to version 2.14.0). 5779 5780 \item \code{callGeneric()} could fail if the generic had 5781 \code{\dots} as a formal argument. (\PR{15937}). 5782 5783 \item Forking in package \pkg{parallel} called C entry point 5784 \code{exit} in the child. This was unsafe (\code{_exit} should 5785 have been called), and could flush \code{stdin} of the main \R 5786 process (seen most often on Solaris). 5787 5788 As good practice, \code{stdout} is now flushed before forking a child. 5789 5790 \item \R objects such as \code{list(`a\\b` = 1)} now print correctly. 5791 5792 \item \code{getAnywhere("C_pbinom")} now returns correctly a 5793 single object (rather than unlisting it). 5794 5795 \item The \code{confint()} method for \code{nls()} fits failed it 5796 these has specified parameter limits despite using an algorithm 5797 other than \code{"port"}. (\PR{15960}) 5798 5799 \item Subclassing an S4 class failed if the class required 5800 arguments to the generator, through its \code{initialize()} method. 5801 5802 \item \code{removeSource()} did not properly handle expressions 5803 containing arguments that were supplied as missing, e.g. 5804 \code{x[i,]}. (\PR{15957}) 5805 5806 \item \code{as.environment(list())} now works, and 5807 \code{as.list()} of such an environment is now the same as 5808 \code{list()}. (\PR{15926}) 5809 5810 \item Several \pkg{tcltk} functions failed when run in unusual 5811 environments. (\PR{15970}) 5812 5813 \item \code{options(list())} now works (trivially). (\PR{15979}) 5814 5815 \item \code{merge(<dendrogram>, ..)} now works correctly for two 5816 `independent' dendrograms (\PR{15648}), and still compatibly 5817 \emph{via} \code{adjust = "auto"} e.g. for two branches of an 5818 existing dendrogram. 5819 5820 \item The \code{plot} method for \code{"hclust"} objects gets an 5821 optional argument \code{check}; when that is true (the default) it 5822 checks more carefully for valid input. 5823 5824 \item (Windows only) If a user chose to install 64 bit \R but not 5825 32 bit \R, the \file{bin/R} and \file{bin/Rscript} executables 5826 failed to run. (\PR{15981}) 5827 5828 \item Various possible buffer overruns have been prevented, 5829 and missed memory protection added. (\PR{15990}) 5830 5831 \item \command{Rscript} no longer passes \code{--args} to 5832 \command{R} when there are no extra (\dQuote{user}) arguments. 5833 5834 \item objects like \code{getClass("refClass")@prototype} now 5835 \code{print()} and \code{str()} without error. 5836 5837 \item \code{identical()} now also looks at the S4 bit. 5838 5839 \item \code{hist(x, breaks)} is more robust in adding a small fuzz 5840 to few breaks when some are very large. (\PR{15988}) 5841 5842 \item \code{sub()} and \code{gsub()} did not handle regular 5843 expressions like \code{"\\s{2,}"} properly if the text 5844 contained \code{NA} or non-ASCII elements in a UTF-8 5845 locale. Part of this was due to a bug in the TRE library. 5846 (\PR{16009}) 5847 5848 \item \code{RShowDoc("NEWS")} now displays the PDF version. 5849 5850 \item Matrices and arrays with last dimension zero did not print 5851 at all or incompletely. (\PR{16012}) 5852 5853 \item \code{plot.histogram()} and hence \code{hist()} now respect 5854 the \code{xaxs}, \code{yaxs} and \code{lab} graphics parameters. 5855 (\PR{16021}) 5856 5857 \item \code{bw.SJ(x)} and other bw.*() no longer segfault when 5858 \code{x} contains non-finite values. (\PR{16024}) 5859 5860 \item \command{R CMD Rd2pdf} unintentionally ignored its 5861 \option{--os} option. 5862 5863 \item The internal method of \code{download.file()} was not 5864 reporting file sizes and progress correctly on files larger than 5865 2GB (inherited from \code{libxml2}). This is corrected for 64-bit 5866 builds (32-bit platforms may not support such files, but where 5867 possible will be supported in future versions of \R). 5868 5869 \item Work around a bug in OS X Yosemite where key environment 5870 variables may be duplicated causing issues in subprocesses. The 5871 duplicates are now removed on \R startup (\emph{via} 5872 Rprofile). (\PR{16042}) 5873 5874 \item Adjust X11 auto-launch detection in DISPLAY on OS X to 5875 recognize latest XQuartz. 5876 } 5877 } 5878} 5879 5880\section{\Rlogo CHANGES IN R 3.1.1}{ 5881 \subsection{NEW FEATURES}{ 5882 \itemize{ 5883 \item When \code{attach()} reports conflicts, it does so 5884 compatibly with \code{library()} by using \code{message()}. 5885 5886 \item \command{R CMD Sweave} no longer cleans any files by 5887 default, compatibly with versions of \R prior to 3.1.0. There are 5888 new options \option{--clean}, \option{--clean=default} and 5889 \option{--clean=keepOuts}. 5890 5891 \item \code{tools::buildVignette()} and \code{tools::buildVignettes()} 5892 with \code{clean = FALSE} no longer remove any created files. 5893 \code{buildvignette()} gains a \code{keep} argument for more 5894 cleaning customization. 5895 5896 \item The Bioconductor \sQuote{version} used by 5897 \code{setRepositories()} can now be set by environment variable 5898 \env{R_BIOC_VERSION} at runtime, not just when \R is installed. 5899 (It has been stated that Bioconductor will switch from 5900 \sQuote{version} 2.14 to \sQuote{version} 3.0 during the lifetime 5901 of the \R 3.1 series.) 5902 5903 \item Error messages from bugs in embedded \samp{Sexpr} code 5904 in Sweave documents now report the source location. 5905 5906 \item \code{type.convert()}, \code{read.table()} and similar 5907 \code{read.*()} functions get a new \code{numerals} argument, 5908 specifying how numeric input is converted when its conversion to 5909 double precision loses accuracy. The default value, 5910 \code{"allow.loss"} allows accuracy loss, as in \R versions before 5911 3.1.0. 5912 5913 \item For some compilers, integer addition could overflow without 5914 a warning. \R's internal code for both integer addition and 5915 subtraction is more robust now. (\PR{15774}) 5916 5917 \item The function determining the default number of knots for 5918 \code{smooth.spline()} is now exported, as \code{.nknots.smspl()}. 5919 5920 \item \code{dbeta(, a,b)}, \code{pbeta()}, \code{qbeta()} and 5921 \code{rbeta()} are now defined also for \eqn{a = 0}, \eqn{b = 0}, 5922 or infinite \eqn{a} and \eqn{b} (where they typically returned 5923 \code{NaN} before). 5924 5925 \item Many package authors report that the RStudio graphics device 5926 does not work correctly with their package's use of 5927 \code{dev.new()}. The new option \code{dev.new(noRStudioGD = 5928 TRUE)} replaces the RStudio override by the default device as 5929 selected by \R itself, still respecting environment variables 5930 \env{R_INTERACTIVE_DEVICE} and \env{R_DEFAULT_DEVICE}. 5931 5932 \item \code{readRDS()} now returns visibly. 5933 5934 \item Modifying internal logical scalar constants now results in 5935 an error instead of a warning. 5936 5937 \item \code{install.packages(repos = NULL)} now accepts 5938 \samp{http://} or \samp{ftp://} URLs of package archives as well 5939 as file paths, and will download as required. In most cases 5940 \code{repos = NULL} can be deduced from the extension of the URL. 5941 5942 \item The warning when using partial matching with the \code{$} 5943 operator on data frames is now only given when 5944 \code{options("warnPartialMatchDollar")} is \code{TRUE}. 5945 5946 \item Package help requests like \code{package?foo} now 5947 try the package \code{foo} whether loaded or not. 5948 5949 \item General help requests now default to trying all loaded 5950 packages, not just those on the search path. 5951 5952 \item Added a new function \code{promptImport()}, to generate a 5953 help page for a function that was imported from another package 5954 (and presumably re-exported, or help would not be needed). 5955 } 5956 } 5957 5958 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 5959 \itemize{ 5960 \item \command{configure} option \option{--with-internal-tzcode} 5961 can now be used with variable \code{rsharedir}. 5962 5963 \item The included version of PCRE has been updated to 8.35. 5964 5965 \item There is a new target \command{make uninstall-libR} to 5966 remove an installed shared/static \file{libR}. 5967 5968 \command{make install-libR} now works if a sub-architecture is 5969 used, although the user will need to specify \code{libdir} 5970 differently for different sub-architectures. 5971 5972 \item There is more extensive advice on which LaTeX packages are 5973 required to install \R or to make package manuals (as done by 5974 \command{R CMD check}) in the \sQuote{Writing R Extensions} 5975 manual. 5976 5977 \item Compilers/linkers were handling the visibility control in 5978 \file{src/extra/xz} inconsistently (and apparently in some cases 5979 incorrectly), so it has been simplified. (\PR{15327}) 5980 5981 \item (Windows) There is updated support for the use of ICU for 5982 collation: see the \sQuote{R Installation and Administration Manual}. 5983 } 5984 } 5985 5986 \subsection{BUG FIXES}{ 5987 \itemize{ 5988 \item \code{dbinom(x, n)}, \code{pbinom()}, \code{dpois()}, etc, 5989 are slightly less restrictive in checking if \code{n} is 5990 integer-valued. (Wish of \PR{15734}.) 5991 5992 \item \code{pchisq(x, df, ncp, log.p = TRUE)} is more accurate and 5993 no longer underflows for small \code{x} and \code{ncp < 80}, e.g, 5994 for \code{pchisq(1e-5, df = 100, ncp = 1, log = TRUE)}. 5995 (Based on \PR{15635} and a suggestion by Roby Joehanes.) 5996 5997 \item The \code{s} (\dQuote{step into}) command in the debugger 5998 would cause \R to step into expressions evaluated there, 5999 not just into functions being debugged. (\PR{15770}) 6000 6001 \item The C code used by \code{strptime()} rejected time-zone 6002 offsets of more than \code{+1200} (\code{+1245}, \code{+1300} and 6003 \code{+1400} can occur). (\PR{15768}) 6004 6005 \item (Windows only.) 6006 \code{png(type = "cairo", antialias = "gray")} 6007 was not accepted. (\PR{15760}) 6008 6009 \item Use of \code{save(..., envir=)} with named objects could 6010 fail. (\PR{15758}) 6011 6012 \item \code{Sweave()} mis-parsed \samp{Sexpr} expressions that 6013 contained backslashes. (\PR{15779}) 6014 6015 \item The return value from \code{options(foo = NULL)} was not 6016 the previous value of the option. (\PR{15781}) 6017 6018 \item \code{enc2utf8()} and \code{enc2native()} did not always 6019 mark the encoding of the return values when it was known. 6020 6021 \item \code{dnbinom(x, size = <large>, mu, log = TRUE)} no longer 6022 underflows to -Inf for large \code{mu}, thanks to a suggestion 6023 from Alessandro Mammana (MPI MolGen, Berlin). 6024 6025 \item \code{pbeta(x, a, b, log = TRUE)} no longer behaves 6026 discontinuously (in a small x-region) because of denormalized 6027 numbers. Also, \code{pbeta(1-1e-12, 1e30, 1.001, log=TRUE)} now 6028 terminates \dQuote{in real time}. 6029 6030 \item The \code{"CRAN"} filter (see \code{available.packages()}) 6031 no longer removes duplicates other than of packages on CRAN, and 6032 does not fail if there is no CRAN repository in 6033 \code{getOption("repos")}. 6034 6035 \item The device listing from \code{dev2bitmap()} and 6036 \code{bitmap()} was truncated to 1000 characters: modern versions 6037 of GhostScript on most platforms have many more devices. 6038 6039 \item (Windows.) Commands such as \code{Sys.which()} and 6040 \code{pipe()} which needed to find the full path to a command 6041 could segfault if the \sQuote{long} path name was much longer than 6042 the \sQuote{short} path name (which \code{Sys.which()} returns), 6043 as the behaviour of the Windows API call had changed. 6044 6045 \item \command{R CMD build} will fail with an error if one of the 6046 packages specified in the \samp{VignetteBuilder} field is not 6047 installed. (Without loading those packages it cannot be 6048 ascertained which files are intended to be vignettes. This means 6049 that the \samp{VignetteBuilder} packages have to be installed for 6050 package checking too.) 6051 (Wish of \PR{15775}.) 6052 6053 \item Misguided attempts to use \code{chull()} with non-finite 6054 points now give an error (related to \PR{15777}). 6055 6056 \item For a formula with exactly 32 variables the 32nd variable 6057 was aliased to the intercept in some C-level computations of 6058 terms, so that for example attempting to remove it would remove 6059 the intercept instead (and leave a corrupt internal structure). 6060 (\PR{15735}) 6061 6062 \item \code{anyDuplicated()} silently returned wrong values when 6063 the first duplicate was at an index which was too large to be 6064 stored in an integer vector (although a lot of RAM and patience 6065 would have been needed to encounter this). 6066 6067 \item \code{tools::Rd2ex(commentDontrun = FALSE)} failed if the 6068 block had only one line. 6069 6070 \item Hexadecimal constants such as \code{0x110p-5L} which were 6071 incorrectly qualified by \code{L} were parsed incorrectly since \R 6072 3.0.0, with a slightly garbled warning. (\PR{15753}) 6073 6074 \item \code{system()} returned success on some platforms even if 6075 the system was unable to launch a process. (\PR{15796}) 6076 6077 \item (Windows \command{Rgui} console.) Unbuffered output was 6078 sometimes not output immediately if the prompt was not on the last 6079 line of the console. 6080 6081 \item The built-in help server did not declare the encoding for 6082 the \file{DESCRIPTION} or other text files to be the package 6083 encoding, so non-ASCII characters could be displayed incorrectly. 6084 6085 \item \R{} is now trying harder to not cleanup child processes 6086 that were not spawned by \code{mcparallel()} on platforms that 6087 provide information about the source process of the \code{SIGCHLD} 6088 signal. This allows 3rd party libraries to manage the exit status 6089 of children that they spawn without \R{} interfering. 6090 6091 \item \code{mcmapply()} was only parallelizing if the number of 6092 jobs was bigger than the number of cores. It now parallelizes if 6093 the number of jobs is more than one. 6094 6095 \item Auto-printing would re-evaluate its argument when trying to 6096 dispatch to a print method. This is now avoided when possible. 6097 6098 \item Unserializing (including \code{load()} and \code{readRDS()}) 6099 could silently return incorrect numeric values from ASCII saves if 6100 there was a read error. 6101 6102 \item \code{getParseData()} could return incorrect values for 6103 the parents of some elements. (Reported by Andrew Redd.) 6104 6105 \item Attempting to use data frames of 2^31 or more rows with 6106 \code{merge()} or to create a merged data frame of that size now 6107 gives a clearer error message. 6108 6109 \item \code{parse()} did not check its \code{file} argument was a 6110 connection if it was not a character string, so 6111 e.g.\sspace{}\code{parse(FALSE)} attempted to read from \code{stdin}. 6112 6113 Nor did \code{dump()} and \code{dput()}. 6114 6115 \item The \code{"help.try.all.packages"} option was ignored when 6116 the shortcut syntax for help was used, e.g.\sspace{}\code{?foo}. 6117 6118 \item A potential segfault in string allocation has been fixed. 6119 (Found by Radford Neal.) 6120 6121 \item Potential memory protection errors in \code{sort()} and 6122 \code{D()} have been fixed. (Found by Radford Neal.) 6123 6124 \item Fixed a lack of error checking in graphics event functions. 6125 (Found by Radford Neal; a different patch used here than the 6126 one in pqR.) 6127 6128 \item \code{numericDeriv()} sometimes miscalculated the gradient. 6129 (\PR{15849}, reported originally by Radford Neal) 6130 } 6131 } 6132} 6133 6134\section{\Rlogo CHANGES IN R 3.1.0}{ 6135 \subsection{NEW FEATURES}{ 6136 \itemize{ 6137 \item \code{type.convert()} (and hence by default 6138 \code{read.table()}) returns a character vector or factor when 6139 representing a numeric input as a double would lose accuracy. 6140 Similarly for complex inputs. 6141 6142 If a file contains numeric data with unrepresentable numbers of 6143 decimal places that are intended to be read as numeric, specify 6144 \code{colClasses} in \code{read.table()} to be \code{"numeric"}. 6145 6146 \item \code{tools::Rdiff(useDiff = FALSE)} is closer to the POSIX 6147 definition of \command{diff -b} (as distinct from the description 6148 in the \command{man} pages of most systems). 6149 6150 \item New function \code{anyNA()}, a version of 6151 \code{any(is.na(.))} which is fast for atomic vectors, based on a 6152 proposal by Tim Hesterberg. (Wish of \PR{15239}.) 6153 6154 \item \code{arrayInd(*, useNames = TRUE)} and, analogously, 6155 \code{which(*, arr.ind = TRUE)} now make use of 6156 \code{names(.dimnames)} when available. 6157 6158 \item \code{is.unsorted()} now also works for \code{raw} vectors. 6159 6160 \item The \code{"table"} method for \code{as.data.frame()} (also 6161 useful as \code{as.data.frame.table()}) now passes \code{sep} and 6162 \code{base} arguments to \code{provideDimnames()}. 6163 6164 \item \code{uniroot()} gets new optional arguments, notably 6165 \code{extendInt}, allowing to auto-extend the search interval when 6166 needed. The return value has an extra component, \code{init.it}. 6167 6168 % advertize at all? 6169 % \item New \code{.lm.fit()} for benchmark lovers but not Joe 6170 % Average. 6171 6172 %% TODO: change in ../src/library/compiler/noweb/compiler.nw + ..../R/cmp.R 6173 \item \code{switch(f, ...)} now warns when \code{f} is a factor, 6174 as this typically happens accidentally where the useR meant to 6175 pass a character string, but \code{f} is treated as integer (as 6176 always documented). 6177 6178 \item The parser has been modified to use less memory. 6179 6180 \item The way the unary operators (\code{+ - !}) handle attributes 6181 is now more consistent. If there is no coercion, all attributes 6182 (including class) are copied from the input to the result: 6183 otherwise only names, dims and dimnames are. 6184 6185 \item \code{colorRamp()} and \code{colorRampPalette()} now allow 6186 non-opaque colours and a ramp in opacity \emph{via} the new argument 6187 \code{alpha = TRUE}. (Suggested by Alberto Krone-Martins, but 6188 optionally as there are existing uses which expect only RGB values.) 6189 % https://stat.ethz.ch/pipermail/r-devel/2013-July/067046.html 6190 6191 \item \code{grid.show.layout()} and \code{grid.show.viewport()} 6192 get an optional \code{vp.ex} argument. 6193 6194 \item There is a new function \code{find_gs_cmd()} in the 6195 \pkg{tools} package to locate a GhostScript executable. (This is 6196 an enhanced version of a previously internal function there.) 6197 6198 \item \code{object.size()} gains a \code{format()} method. 6199 6200 \item There is a new family, \code{"ArialMT"}, for the 6201 \code{pdf()} and \code{postscript()} devices. This will only be 6202 rendered correctly on viewers which have access to Monotype 6203 TrueType fonts (which are sometimes requested by journals). 6204 6205 \item The text and PDF news files, including \file{NEWS} and 6206 \file{NEWS.2}, have been moved to the \file{doc} directory. 6207 6208 \item \code{combn(x, simplify = TRUE)} now gives a factor result 6209 for factor input \code{x} (previously user error). 6210 (Related to \PR{15442}.) 6211 6212 \item Added \code{utils::fileSnapshot()} and 6213 \code{utils::changedFiles()} functions to allow snapshots and 6214 comparison of directories of files. 6215 6216 \item \code{make.names(names, unique=TRUE)} now tries to preserve 6217 existing names. (Suggestion of \PR{15452}.) 6218 6219 \item New functions \code{cospi(x)}, \code{sinpi(x)}, and 6220 \code{tanpi(x)}, for more accurate computation of 6221 \code{cos(pi*x)}, etc, both in \R{} and the C API. Using these 6222 gains accuracy in some cases, e.g., inside \code{lgamma()} or 6223 \code{besselI()}. (Suggested by Morten Welinder in \PR{15529}.) 6224 6225 \item \code{print.table(x, zero.print = ".")} now also has an 6226 effect when \code{x} is not integer-valued. 6227 6228 \item There is more support to explore the system's idea of 6229 time-zone names. \code{Sys.timezone()} tries to give the current 6230 system setting by name (and succeeds at least on Linux, OS X, 6231 Solaris and Windows), and \code{OlsonNames()} lists the names in 6232 the system's Olson database. \code{Sys.timezone(location = FALSE)} 6233 gives the previous behaviour. 6234 6235 \item Platforms with a 64-bit \code{time_t} type are allowed to 6236 handle conversions between the \code{"POSIXct"} and 6237 \code{"POSIXlt"} classes for date-times outside the 32-bit range 6238 (before 1902 or after 2037): the existing workarounds are used on 6239 other platforms. (Note that time-zone information for post-2037 6240 is speculative at best, and the OS services are tested for known 6241 errors and so not used on OS X.) 6242 6243 Currently \code{time_t} is usually \code{long} and hence 64-bit on 6244 Unix-alike 64-bit platforms: however in several cases the 6245 time-zone database is 32-bit. For \R for Windows it is 64-bit 6246 (for both architectures as from this version). 6247 6248 \item The \code{"save.defaults"} option can include a value for 6249 \code{compression_level}. (Wish of \PR{15579}.) 6250 6251 \item \code{colSums()} and friends now have support for arrays and 6252 data-frame columns with \eqn{2^{31}}{2^31} or more elements. 6253 6254 \item \code{as.factor()} is faster when \code{f} is an unclassed 6255 integer vector (for example, when called from \code{tapply()}). 6256 6257 \item \code{fft()} now works with longer inputs, from the 12 6258 million previously supported up to 2 billion. (\PR{15593}) 6259 6260 \item Complex \code{svd()} now uses LAPACK subroutine 6261 \code{ZGESDD}, the complex analogue of the routine used for the 6262 real case. 6263 6264 \item Sweave now outputs \file{.tex} files in UTF-8 if the 6265 input encoding is declared to be UTF-8, regardless of the 6266 local encoding. The UTF-8 encoding may now be declared using 6267 a LaTeX comment containing the string \code{\%\\SweaveUTF8} 6268 on a line by itself. 6269 6270 \item \code{file.copy()} gains a \code{copy.date} argument. 6271 6272 \item Printing of date-times will make use of the time-zone 6273 abbreviation in use at the time, if known. For example, for Paris 6274 pre-1940 this could be \samp{LMT}, \samp{PMT}, \samp{WET} or 6275 \samp{WEST}. To enable this, the \code{"POSIXlt"} class has an 6276 optional component \code{"zone"} recording the abbreviation for 6277 each element. 6278 6279 For platforms which support it, there is also a component 6280 \code{"gmtoff"} recording the offset from GMT where known. 6281 6282 \item (On Windows, by default on OS X and optionally elsewhere.) 6283 The system C function \code{strftime} has been replaced by a more 6284 comprehensive version with closer conformance to the POSIX 2008 6285 standard. 6286 6287 \item \code{dnorm(x, log = FALSE)} is more accurate (but somewhat 6288 slower) for |x| > 5; as suggested in \PR{15620}. 6289 6290 \item Some versions of the \code{tiff()} device have further 6291 compression options. 6292 6293 \item \code{read.table()}, \code{readLines()} and \code{scan()} 6294 have a new argument to influence the treatment of embedded nuls. 6295 6296 \item Avoid duplicating the right hand side values in complex 6297 assignments when possible. This reduces copying of replacement 6298 values in expressions such as \code{Z$a <- a0} and 6299 \code{ans[[i]] <- tmp}: some package code has relied on there 6300 being copies. 6301 6302 Also, a number of other changes to reduce copying of objects; all 6303 contributed by or based on suggestions by Michael Lawrence. 6304 6305 \item The \code{fast} argument of \code{KalmanLike()}, 6306 \code{KalmanRun()} and \code{KalmanForecast()} has been replaced 6307 by \code{update}, which instead of updating \code{mod} in place, 6308 optionally returns the updated model in an attribute \code{"mod"} 6309 of the return value. 6310 6311 \item \code{arima()} and \code{makeARIMA()} get a new optional 6312 argument \code{SSinit}, allowing the choice of a different 6313 \bold{s}tate \bold{s}pace initialization which has been observed 6314 to be more reliable close to non-stationarity: see \PR{14682}. 6315 6316 \item \code{warning()} has a new argument \code{noBreaks.}, to 6317 simplify post-processing of output with \code{options(warn = 1)}. 6318 6319 \item \code{pushBack()} gains an argument \code{encoding}, to 6320 support reading of UTF-8 characters using \code{scan()}, 6321 \code{read.table()} and related functions in a non-UTF-8 locale. 6322 6323 \item \code{all.equal.list()} gets a new argument \code{use.names} 6324 which by default labels differing components by names (if they 6325 match) rather than by integer index. Saved \R output in packages may 6326 need to be updated. 6327 6328 \item The methods for \code{all.equal()} and 6329 \code{attr.all.equal()} now have argument \code{check.attributes} 6330 after \code{\dots} so it cannot be partially nor positionally 6331 matched (as it has been, unintentionally). 6332 6333 A side effect is that some previously undetected errors of passing 6334 empty arguments (no object between commas) to \code{all.equal()} 6335 are detected and reported. 6336 6337 There are explicit checks that \code{check.attributes} is logical, 6338 \code{tolerance} is numeric and \code{scale} is \code{NULL} or 6339 numeric. This catches some unintended positional matching. 6340 6341 The message for \code{all.equal.numeric()} reports a 6342 \code{"scaled difference"} only for \code{scale != 1}. 6343 6344 \item \code{all.equal()} now has a \code{"POSIXt"} method 6345 replacing the \code{"POSIXct"} method. 6346 6347 \item The \code{"Date"} and \code{"POSIXt"} methods of 6348 \code{seq()} allows \code{by = "quarter"} for completeness 6349 (\code{by = "3 months"} always worked). 6350 6351 \item \code{file.path()} removes any trailing separator on 6352 Windows, where they are invalid (although sometimes accepted). 6353 This is intended to enhance the portability of code written by 6354 those using POSIX file systems (where a trailing \code{/} can be 6355 used to confine path matching to directories). 6356 6357 \item New function \code{agrepl()} which like \code{grepl()} 6358 returns a logical vector. 6359 6360 \item \code{fifo()} is now supported on Windows. (\PR{15600}) 6361 6362 \item \code{sort.list(method = "radix")} now allows negative 6363 integers (wish of \PR{15644}). 6364 6365 \item Some functionality of \code{print.ts()} is now available in 6366 \code{.preformat.ts()} for more modularity.% and format.ts() might follow 6367 6368 \item \code{mcparallel()} gains an option \code{detach = TRUE} 6369 which allows execution of code independently of the current 6370 session. It is based on a new \code{estranged = TRUE} argument to 6371 \code{mcfork()} which forks child processes such that they become 6372 independent of the parent process. 6373 6374 \item The \code{pdf()} device omits circles and text at extremely 6375 small sizes, since some viewers were failing on such files. 6376 6377 \item The rightmost break for the \code{"months"}, 6378 \code{"quarters"} and \code{"years"} cases of 6379 \code{hist.POSIXlt()} has been increased by a day. (Inter alia, 6380 fixes \PR{15717}.) 6381 6382 \item The handling of \code{DF[i,] <- a} where \code{i} is of 6383 length 0 is improved. (Inter alia, fixes \PR{15718}.) 6384 6385 \item \code{hclust()} gains a new method \code{"ward.D2"} which 6386 implements Ward's method correctly. The previous \code{"ward"} 6387 method is \code{"ward.D"} now, with the old name still working. 6388 Thanks to research and proposals by Pierre Legendre. 6389 6390 \item The \code{sunspot.month} dataset has been amended and 6391 updated from the official source, whereas the \code{sunspots} and 6392 \code{sunspot.year} datasets will remain immutable. The 6393 documentation and source links have been updated correspondingly. 6394 6395 \item The \code{summary()} method for \code{"lm"} fits warns if 6396 the fit is essentially perfect, as most of the summary may be 6397 computed inaccurately (and with platform-dependent values). 6398 6399 Programmers who use \code{summary()} in order to extract just 6400 a component which will be reliable (e.g., \code{$cov.unscaled}) 6401 should wrap their calls in \code{suppressWarnings()}. 6402 } 6403 } 6404 6405 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 6406 \itemize{ 6407 \item The included version of LAPACK has been updated to 3.5.0. 6408 6409 \item There is some support for parallel testing of an 6410 installation, by setting \env{TEST_MC_CORES} to an integer 6411 greater than one to indicate the maximum number of cores to be 6412 used in parallel. (It is worth specifying at least 8 cores if 6413 available.) Most of these require a \command{make} program (such 6414 as GNU \command{make} and \command{dmake}) which supports the 6415 \command{${MAKE} -j nproc} syntax. 6416 6417 Except on Windows: the tests of standard package examples in 6418 \command{make check} are done in parallel. This also applies to 6419 running \code{tools::testInstalledPackages()}. 6420 6421 The more time-consuming regression tests are done in parallel. 6422 6423 The package checks in \command{make check-devel} and \command{make 6424 check-recommended} are done in parallel. 6425 6426 \item More of \command{make check} will work if recommended packages 6427 are not installed: but recommended packages remain needed for 6428 thorough checking of an \R build. 6429 6430 \item The version of \samp{tzcode} included in 6431 \file{src/extra/tzone} has been updated. (Formerly used only on 6432 Windows.) 6433 6434 \item The included (64-bit) time-zone conversion code and Olson 6435 time-zone database can be used instead of the system version: use 6436 \command{configure} option \option{--with-internal-tzcode}. This 6437 is the default on Windows and OS X. (Note that this does not 6438 currently work if a non-default \code{rsharedir} 6439 \command{configure} variable is used.) 6440 6441 (It might be necessary to set environment variable \env{TZ} on 6442 OSes where this is not already set, although the system timezone is 6443 deduced correctly on at least Linux, OS X and Windows.) 6444 6445 This option also switches to the version of \code{strftime} 6446 included in directory \file{src/extra/tzone}. 6447 6448 \item \command{configure} now tests for a C++11-compliant compiler 6449 by testing some basic features. This by default tries flags for 6450 the compiler specified by \samp{CXX}, but an alternative compiler, 6451 options and standard can be specified by variables \samp{CXX1X}, 6452 \samp{CXX1XFLAGS} and \samp{CXX1XSTD} (e.g., \samp{-std=gnu++11}). 6453 6454 \item \R{} can now optionally be compiled to use reference 6455 counting instead of the \code{NAMED} mechanism by defining 6456 \code{SWITCH_TO_REFCNT} in \file{Rinternals.h}. This may become 6457 the default in the future. 6458 6459 \item There is a new option \option{--use-system-tre} to use a 6460 suitable system \pkg{tre} library: at present this means a version 6461 from their \command{git} repository, after corrections. 6462 (Wish of \PR{15660}.) 6463 } 6464 } 6465 6466 \subsection{PACKAGE INSTALLATION}{ 6467 \itemize{ 6468 \item The \code{CRANextra} repository is no longer a default 6469 repository on Windows: all the binary versions of packages from 6470 CRAN are now on CRAN, although \code{CRANextra} contains packages 6471 from Omegahat and elsewhere used by CRAN packages. 6472 6473 \item Only vignettes sources in directory \file{vignettes} are 6474 considered to be vignettes and hence indexed as such. 6475 6476 \item In the \file{DESCRIPTION} file, \preformatted{ License: X11} 6477 is no longer recognized as valid. Use \samp{MIT} or 6478 \samp{BSD_2_clause} instead, both of which need \samp{+ file LICENSE}. 6479 6480 \item For consistency, entries in \file{.Rinstignore} are now matched 6481 case-insensitively on all platforms. 6482 6483 \item Help for S4 methods with very long signatures now tries 6484 harder to split the description in the \samp{Usage} field to no 6485 more than 80 characters per line (some packages had over 120 6486 characters). 6487 6488 \item \command{R CMD INSTALL --build} (not Windows) now defaults to 6489 the internal \code{tar()} unless \env{R_INSTALL_TAR} is set. 6490 6491 \item There is support for compiling C++11 code in packages on 6492 suitable platforms: see \sQuote{Writing R Extensions}. 6493 6494 \item Fake installs now install the contents of directory 6495 \file{inst}: some packages use this to install e.g.\sspace{}C++ headers 6496 for use by other packages that are independent of the package 6497 itself. Option \option{--no-inst} can be used to get the previous 6498 behaviour. 6499 } 6500 } 6501 6502 \subsection{DEBUGGING}{ 6503 \itemize{ 6504 \item The behaviour of the code browser has been made more 6505 consistent, in part following the suggestions in \PR{14985}. 6506 6507 \item Calls to \code{browser()} are now consistent with calls 6508 to the browser triggered by \code{debug()}, in that \kbd{Enter} 6509 will default to \code{n} rather than \code{c}. 6510 6511 \item A new browser command \code{s} has been added, to 6512 \dQuote{step into} function calls. 6513 6514 \item A new browser command \code{f} has been added, to 6515 \dQuote{finish} the current loop or function. 6516 6517 \item Within the browser, the command \code{help} will 6518 display a short list of available commands. 6519 } 6520 } 6521 6522 \subsection{UTILITIES}{ 6523 \itemize{ 6524 \item Only vignettes sources in directory \file{vignettes} are 6525 considered to be vignettes by \command{R CMD check}. That has 6526 been the preferred location since \R 2.14.0 and is now obligatory. 6527 6528 \item For consistency, \command{R CMD build} now matches entries 6529 in \file{.Rbuildignore} and \file{vignettes/.install_extras} 6530 case-insensitively on all platforms (not just on Windows). 6531 6532 \item \code{checkFF()} (called by \command{R CMD check} by 6533 default) can optionally check foreign function calls for 6534 consistency with the registered type and argument count. This is 6535 the default for \command{R CMD check --as-cran} or can be enabled 6536 by setting environment variable \env{_R_CHECK_FF_CALLS_} to 6537 \samp{registration} (but is in any case suppressed by 6538 \option{--install=no}). Because this checks calls in which 6539 \code{.NAME} is an \R object and not just a literal character 6540 string, some other problems are detected for such calls. 6541 6542 Functions \code{suppressForeignCheck()} and \code{dontCheck()} 6543 have been added to allow package authors to suppress false 6544 positive reports. 6545 6546 \item \command{R CMD check --as-cran} warns about a false value of 6547 the \file{DESCRIPTION} field \samp{BuildVignettes} for Open Source 6548 packages, and ignores it. (An Open Source package needs to have 6549 complete sources for its vignettes which should be usable on a 6550 suitably well-equipped system). 6551 6552 \item \command{R CMD check --no-rebuild-vignettes} is defunct:\cr 6553 \command{R CMD check --no-build-vignettes} has been preferred since 6554 \R 3.0.0. 6555 6556 \item \command{R CMD build --no-vignettes} is defunct:\cr 6557 \command{R CMD build --no-build-vignettes} has been preferred since 6558 \R 3.0.0. 6559 6560 \item \command{R CMD Sweave} and \command{R CMD Stangle} now 6561 process both Sweave and non-Sweave vignettes. The 6562 \code{tools::buildVignette()} function has been added to do the 6563 same tasks from within \R. 6564 6565 \item The flags returned by \command{R CMD config --ldflags} and 6566 (where installed) \command{pkg-config --libs libR} are now those 6567 needed to link a front-end against the (shared or static) \R 6568 library. 6569 6570 \item \file{Sweave.sty} has a new option \samp{[inconsolata]}. 6571 6572 \item \command{R CMD check} customizations such as 6573 \env{_R_CHECK_DEPENDS_ONLY_} make available packages only in 6574 \samp{LinkingTo} only for installation, and not for 6575 loading/runtime tests. 6576 6577 \item \command{tools::checkFF()} reports on \code{.C} and 6578 \code{.Fortran} calls with \code{DUP = FALSE} if argument 6579 \code{check_DUP} is true. This is selected by 6580 \command{R CMD check} by default. 6581 6582 \item \command{R CMD check --use-gct} can be tuned to 6583 garbage-collect less frequently using \code{gctorture2()} 6584 \emph{via} the setting of environment variable 6585 \env{_R_CHECK_GCT_N_}. 6586 6587 \item Where supported, \code{tools::texi2dvi()} limits the number 6588 of passes tried to 20. 6589 } 6590 } 6591 6592 \subsection{C-LEVEL FACILITIES}{ 6593 \itemize{ 6594 \item (Windows only) A function \code{R_WaitEvent()} has been 6595 added (with declaration in header\file{R.h}) to block execution 6596 until the next event is received by \R. 6597 6598 \item Remapping in the \file{Rmath.h} header can be suppressed by 6599 defining \samp{R_NO_REMAP_RMATH}. 6600 6601 \item The remapping of \code{rround()} in header \file{Rmath.h} 6602 has been removed: use \code{fround()} instead. 6603 6604 \item \code{ftrunc()} in header \file{Rmath.h} is now a wrapper 6605 for the C99 function \code{trunc()}, which might as well be used 6606 in C code: \code{ftrunc()} is still needed for portable C++ code. 6607 6608 \item The never-documented remapping of \code{prec()} to 6609 \code{fprec()} in header \file{Rmath.h} has been removed. 6610 6611 \item The included LAPACK subset now contains \code{ZGESDD} and 6612 \code{ZGELSD}. 6613 6614 \item The function \code{LENGTH()} now checks that it is only 6615 applied to vector arguments. However, in packages \code{length()} 6616 should be used. (In \R{} itself \code{LENGTH()} is a macro without 6617 the function overhead of \code{length()}.) 6618 6619 \item Calls to \code{SET_VECTOR_ELT()} and \code{SET_STRING_ELT()} 6620 are now checked for indices which are in-range: several packages 6621 were writing one element beyond the allocated length. 6622 6623 \item \code{allocVector3} has been added which allows custom 6624 allocators to be used for individual vector allocations. 6625 } 6626 } 6627 6628 \subsection{DEPRECATED AND DEFUNCT}{ 6629 \itemize{ 6630 \item \code{chol(pivot = TRUE, LINPACK = TRUE)} is defunct. 6631 6632 Arguments \code{EISPACK} for \code{eigen()} and \code{LINPACK} for 6633 \code{chol()}, \code{chol2inv()}, \code{solve()} and \code{svd()} 6634 are ignored: LAPACK is always used. 6635 6636 \item \code{.find.package()} and \code{.path.package()} are 6637 defunct: only the versions without the initial dot introduced in 6638 \R 2.13.0 have ever been in the API. 6639 6640 \item Partial matching when using the \code{$} operator \emph{on 6641 data frames} now throws a warning and may become defunct in the 6642 future. If partial matching is intended, replace \code{foo$bar} 6643 by \code{foo[["bar", exact = FALSE]]}. 6644 6645 \item The long-deprecated use of \code{\\synopsis} in the 6646 \samp{Usage} section of \file{.Rd} files has been removed: such 6647 sections are now ignored (with a warning). 6648 6649 \item \code{package.skeleton()}'s deprecated argument 6650 \code{namespace} has been removed. 6651 6652 \item Many methods are no longer exported by package \pkg{stats}. 6653 They are all registered on their generic, which should be called 6654 rather than calling a method directly. 6655 6656 \item Functions \code{readNEWS()} and \code{checkNEWS()} in 6657 package \pkg{tools} are defunct. 6658 6659 \item \code{download.file(method = "lynx")} is deprecated. 6660 6661 \item \code{.C(DUP = FALSE)} and \code{.Fortran(DUP = FALSE)} are 6662 now deprecated, and may be disabled in future versions of \R. As 6663 their help has long said, \code{.Call()} is much preferred. 6664 6665 \command{R CMD check} notes such usages (by default). 6666 6667 \item The workaround of setting \env{R_OSX_VALGRIND} has been 6668 removed: it is not needed in current valgrind. 6669 } 6670 } 6671 6672 \subsection{BUG FIXES}{ 6673 \itemize{ 6674 \item Calling \code{lm.wfit()} with no non-zero weights gave an 6675 array-overrun in the Fortran code and a not very sensible answer. 6676 It is now special-cased with a simpler answer (no \code{qr} 6677 component). 6678 6679 \item Error messages involving non-syntactic names (e.g., as produced 6680 by \code{`\\r`} when that object does not exist) now encode 6681 the control characters. (Reported by Hadley Wickham.) 6682 6683 \item \code{getGraphicsEvent()} caused 100\% usage of one CPU in 6684 Windows. (\PR{15500}) 6685 6686 \item \code{nls()} with no \code{start} argument may now work 6687 inside another function (scoping issue). 6688 6689 \item \code{pbeta()} and similar work better for very large 6690 (billions) \code{ncp}. 6691 6692 \item Where time zones have changed abbreviations over the years, 6693 the software tries to more consistently use the abbreviation 6694 appropriate to the time or if that is unknown, the current 6695 abbreviation. On some platforms where the C function 6696 \code{localtime} changed the \code{tzname} variables the reported 6697 abbreviation could have been that of the last time converted. 6698 6699 \item \code{all.equal(list(1), identity)} now works. 6700 6701 \item Bug fix for pushing viewports in \pkg{grid} (reported by 6702 JJ Allaire and Kevin Ushey). 6703 6704 NOTE for anyone poking around within the graphics engine display 6705 list (despite the warnings not to) that this changes what 6706 is recorded by \pkg{grid} on the graphics engine display list. 6707 6708 \item Extra checks have been added for unit resolution and 6709 conversion in \pkg{grid}, to catch instances of division-by-zero. 6710 This may introduce error messages in existing code and/or produce 6711 a different result in existing code (but only where a non-finite 6712 location or dimension may now become zero). 6713 6714 \item Some bugs in TRE have been corrected by updating from the 6715 \command{git} repository. This allows \R to be installed on some 6716 platforms for which this was a blocker (\PR{15087} suggests Linux 6717 on ARM and HP-UX). 6718 6719 \item \code{?} applied to a call to an S4 generic failed in 6720 several cases. (\PR{15680}) 6721 6722 \item The implicit S4 generics for primitives with \code{\dots} in 6723 their argument list were incorrect. (\PR{15690}) 6724 6725 \item Bug fixes to \code{methods::callGeneric()}. (\PR{15691}) 6726 6727 \item The bug fix to \code{aggregrate()} in \PR{15004} introduced 6728 a new bug in the case of no grouping variables. (\PR{15699}) 6729 6730 \item In rare cases printing deeply nested lists overran a buffer 6731 by one byte and on a few platforms segfaulted. (\PR{15679}) 6732 6733 \item The dendrogram method of \code{as.dendrogram()} was hidden 6734 accidentally, (\PR{15703}), and \code{order.dendrogram(d)} gave 6735 too much for a leaf \code{d}. (\PR{15702}) 6736 6737 \item \R would try to kill processes on exit that have pids ever 6738 used by a child process spawned by \code{mcparallel} even though 6739 the current process with that pid was not actually its child. 6740 6741 \item \code{cophenetic()} applied to a \code{"dendrogram"} object 6742 sometimes incorrectly returned a \code{"Labels"} attribute with 6743 dimensions. (\PR{15706}) 6744 6745 \item \code{printCoefmat()} called from quite a few \code{print()} 6746 methods now obeys small \code{getOption("width")} settings, 6747 line wrapping the \samp{"signif. codes"} legend appropriately. 6748 (\PR{15708}) 6749 6750 \item \code{model.matrix()} assumed that the stored dimnames for a 6751 matrix was \code{NULL} or length 2, but length 1 occurred. 6752 6753 \item The clipping region for a device was sometimes used in base 6754 graphics before it was set. 6755 } 6756 } 6757} 6758 6759\section{\Rlogo CHANGES IN R 3.0.3}{ 6760 \subsection{NEW FEATURES}{ 6761 \itemize{ 6762 \item On Windows there is support for making \file{.texi} manuals 6763 using \command{texinfo} 5.0 or later: the setting is in file 6764 \file{src/gnuwin32/MkRules.dist}. 6765 6766 A packaging of the Perl script and modules for \command{texinfo} 6767 5.2 has been made available at 6768 \url{http://www.stats.ox.ac.uk/pub/Rtools/}. 6769 6770 \item \code{write.table()} now handles matrices of 6771 \eqn{2^{31}}{2^31} or more elements, for those with large amounts 6772 of patience and disc space. 6773 6774 \item There is a new function, \code{La_version()}, to report the 6775 version of LAPACK in use. 6776 6777 \item The HTML version of \sQuote{An Introduction to R} now has 6778 links to PNG versions of the figures. 6779 6780 \item There is some support to produce manuals in ebook 6781 formats. (See \file{doc/manual/Makefile}. Suggested by Mauro 6782 Cavalcanti.) 6783 6784 \item On a Unix-alike \code{Sys.timezone()} returns \code{NA} if 6785 the environment variable \env{TZ} is unset, to distinguish it from 6786 an empty string which on some OSes means the \samp{UTC} time zone. 6787 6788 \item The backtick may now be escaped in strings, to allow names 6789 containing them to be constructed, e.g.\sspace{}\code{`\\``}. (\PR{15621}) 6790 6791 \item \code{read.table()}, \code{readLines()} and \code{scan()} 6792 now warn when an embedded nul is found in the input. (Related to 6793 \PR{15625} which was puzzled by the behaviour in this unsupported 6794 case.) 6795 6796 \item (Windows only.) \code{file.symlink()} works around the 6797 undocumented restriction of the Windows system call to 6798 backslashes. (Wish of \PR{15631}.) 6799 6800 \item \code{KalmanForecast(fast = FALSE)} is now the default, and 6801 the help contains an example of how \code{fast = TRUE} can be used 6802 in this version. (The usage will change in 3.1.0.) 6803 6804 \item \code{strptime()} now checks the locale only when 6805 locale-specific formats are used and caches the locale in use: 6806 this can halve the time taken on OSes with slow system 6807 functions (e.g., OS X). 6808 6809 \item \code{strptime()} and the \code{format()} methods for 6810 classes \code{"POSIXct"}, \code{"POSIXlt"} and \code{"Date"} 6811 recognize strings with marked encodings: this allows, for example, 6812 UTF-8 French month names to be read on (French) Windows. 6813 6814 \item \code{iconv(to = "utf8")} is now accepted on all platforms 6815 (some implementations did already, but GNU \pkg{libiconv} did not: 6816 however converted strings were not marked as being in UTF-8). The 6817 official name, \code{"UTF-8"} is still preferred. 6818 6819 \item \code{available.packages()} is better protected against 6820 corrupt metadata files. (A recurring problem with Debian package 6821 \pkg{shogun-r}: \PR{14713}.) 6822 6823 \item Finalizers are marked to be run at garbage collection, but 6824 run only at a somewhat safer later time (when interrupts are 6825 checked). This circumvents some problems with finalizers running 6826 arbitrary code during garbage collection (the known instances being 6827 running \code{options()} and (C-level) \code{path.expand()} 6828 re-entrantly). 6829 } 6830 } 6831 6832 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 6833 \itemize{ 6834 \item The included version of PCRE has been updated to 8.34. This 6835 fixes bugs and makes the behaviour closer to Perl 5.18. In 6836 particular, the concept of \sQuote{space} includes \samp{VT} and 6837 hence agrees with POSIX's. 6838 } 6839 } 6840 6841 \subsection{PACKAGE INSTALLATION}{ 6842 \itemize{ 6843 \item The new field \samp{SysDataCompression} in the 6844 \file{DESCRIPTION} file allows user control over the compression 6845 used for \file{sysdata.rda} objects in the lazy-load database. 6846 6847 \item \code{install.packages(dependencies = value)} for \code{value = 6848 NA} (the default) or \code{value = TRUE} omits packages only in 6849 \code{LinkingTo} for binary package installs. 6850 } 6851 } 6852 6853 \subsection{C-LEVEL FACILITIES}{ 6854 \itemize{ 6855 \item The long undocumented remapping of \code{rround()} to 6856 \code{Rf_fround()} in header \file{Rmath.h} is now formally 6857 deprecated: use \code{fround()} directly. 6858 6859 \item Remapping of \code{prec()} and \code{trunc()} in the 6860 \file{Rmath.h} header has been disabled in C++ code (it has caused 6861 breakage with \code{libc++} headers). 6862 } 6863 } 6864 6865 \subsection{BUG FIXES}{ 6866 \itemize{ 6867 \item \code{getParseData()} truncated the imaginary part of 6868 complex number constants. (Reported by Yihui Xie.) 6869 6870 \item \code{dbeta(x, a, b)} with \code{a} or \code{b} within a 6871 factor of 2 of the largest representable number could 6872 infinite-loop. (Reported by Ioannis Kosmidis.) 6873 6874 \item \code{provideDimnames()} failed for arrays with a 0 6875 dimension. (\PR{15465}) 6876 6877 \item \code{rbind()} and \code{cbind()} did not handle 6878 list objects correctly. (\PR{15468}) 6879 6880 \item \code{replayPlot()} now checks if it is replaying a plot 6881 from the same session. 6882 6883 \item \code{rasterImage()} and \code{grid.raster()} now give 6884 error on an empty (zero-length) raster. (Reported by Ben North.) 6885 6886 \item \code{plot.lm()} would sometimes scramble the labels 6887 in plot type 5. (\PR{15458} and \PR{14837}) 6888 6889 \item \code{min()} did not handle \code{NA_character_} values 6890 properly. (Reported by Magnus Thor Torfason.) 6891 6892 \item (Windows only.) \code{readRegistry()} would duplicate 6893 default values for keys. (\PR{15455}) 6894 6895 \item \code{str(..., strict.width = "cut")} did not handle 6896 it properly when more than one line needed to be cut. (Reported 6897 by Gerrit Eichner.) 6898 6899 \item Removing subclass back-references when S4 classes were 6900 removed or their namespace unloaded had several bugs (e.g., \PR{15481}). 6901 6902 \item \code{aggregate()} could fail when there were too many 6903 levels present in the \code{by} argument. (\PR{15004}) 6904 6905 \item \code{namespaceImportFrom()} needed to detect primitive 6906 functions when checking for duplicated imports (reported by 6907 Karl Forner). 6908 6909 \item \code{getGraphicsEvent()} did not exit when a user closed 6910 the graphics window. (\PR{15208}) 6911 6912 \item Errors in vignettes were not always captured and displayed 6913 properly. (\PR{15495}) 6914 6915 \item \code{contour()} could fail when dealing with extremely 6916 small z values. (\PR{15454}) 6917 6918 \item Several functions did not handle zero-length vectors properly, 6919 including \code{browseEnv()}, \code{format()}, \code{gl()}, 6920 \code{relist()} and \code{summary.data.frame()}. (E.g., \PR{15499}) 6921 6922 \item \code{Sweave()} did not restore the \R{} output to the 6923 console if it was interrupted by a user in the middle of evaluating 6924 a code chunk. (Reported by Michael Sumner.) 6925 6926 \item Fake installs of packages with vignettes work again. 6927 6928 \item Illegal characters in the input caused \code{parse()} 6929 (and thus \code{source()}) to segfault. (\PR{15518}) 6930 6931 \item The nonsensical use of \code{nmax = 1} in 6932 \code{duplicated()} or \code{unique()} is now silently ignored. 6933 6934 \item \code{qcauchy(p, *)} is now fully accurate even when p is 6935 very close to 1. (\PR{15521}) 6936 6937 \item The \code{validmu()} and \code{valideta()} functions in the 6938 standard \code{glm()} families now also report non-finite values, 6939 rather than failing. 6940 6941 \item Saved vignette results (in a \file{.Rout.save} file) were 6942 not being compared to the new ones during \command{R CMD check}. 6943 6944 \item Double-clicking outside of the list box (e.g., on the scrollbar) 6945 of a Tk listbox widget generated by \code{tk_select.list()} no 6946 longer causes the window to close. (\PR{15407}) 6947 6948 \item Improved handling of edge cases in 6949 \code{parallel::splitindices()}. (\PR{15552}) 6950 6951 \item HTML display of results from \code{help.search()} and 6952 \code{??} sometimes contained badly constructed links. 6953 6954 \item \code{c()} and related functions such as \code{unlist()} 6955 converted raw vectors to invalid logical vectors. (\PR{15535}) 6956 6957 \item (Windows only) When a call to \code{system2()} specified 6958 one of \code{stdin}, \code{stdout} or \code{stderr} to be a file, 6959 but the command was not found (e.g., it contained its arguments, 6960 or the program was not on the \env{PATH}), it left the file open 6961 and unusable until \R terminated. (Reported by Mathew McLean.) 6962 6963 \item The \code{bmp()} device was not recording \code{res = NA} 6964 correctly: it is now recorded as 72 ppi. 6965 6966 \item Several potential problems with compiler-specific behaviour 6967 have been identified using the \sQuote{Undefined Behaviour 6968 Sanitizer} in conjunction with the \command{clang} compiler. 6969 6970 \item \code{hcl()} now honours \code{NA} inputs (previously they 6971 were mapped to black). 6972 6973 \item Some translations in base packages were being looked up in 6974 the main catalog rather than that for the package. 6975 6976 \item As a result of the 3.0.2 change about \sQuote{the last 6977 second before the epoch}, most conversions which should have given 6978 \code{NA} returned that time. (The platforms affected include 6979 Linux and OS X, but not Windows nor Solaris.) 6980 6981 \item \code{rowsum()} has more support for matrices and data frames 6982 with \eqn{2^{31}}{2^31} or more elements. (\PR{15587}) 6983 6984 \item \code{predict(<lm object>, interval = "confidence", scale = 6985 <something>)} now works. (\PR{15564}) 6986 6987 \item The bug fix in 3.0.2 for \PR{15411} was too aggressive, 6988 and sometimes removed spaces that should not have been removed. 6989 (\PR{15583}) 6990 6991 \item Running \R code in a \pkg{tcltk} callback failed to set the 6992 busy flag, which will be needed to tell OS X not to \sQuote{App Nap}. 6993 6994 \item The code for date-times before 1902 assumed that the offset 6995 from GMT in 1902 was a whole number of minutes: that was not true 6996 of Paris (as recorded on some platforms). 6997 6998 \item Using \code{Sys.setlocale} to set \code{LC_NUMERIC} to 6999 \code{"C"} (to restore the sane behavior) no longer gives a 7000 warning. 7001 7002 \item \code{deparse()} now deparses complex vectors in a way that 7003 re-parses to the original values. (\PR{15534}, patch based on code 7004 submitted by Alex Bertram.) 7005 7006 \item In some extreme cases (more than \eqn{10^{15}}{10^15}) 7007 integer inputs to \code{dpqrxxx()} functions might have been 7008 rounded up by one (with a warning about being non-integer). 7009 (\PR{15624}) 7010 7011 \item Plotting symbol \code{pch = 14} had the triangle upside down 7012 on some devices (typically screen devices). The triangle is 7013 supposed to be point up. (Reported by Bill Venables.) 7014 7015 \item \code{getSrcref()} did not work on method definitions if 7016 \code{rematchDefinition()} had been used. 7017 7018 \item \code{KalmanForecast(fast = FALSE)} reported a (harmless) 7019 stack imbalance. 7020 7021 \item The count of observations used by \code{KalmanRun()} did not 7022 take missing values into account. 7023 7024 \item In locales where the abbreviated name of one month is a 7025 partial match for the full name of a later one, the \code{\%B} 7026 format in \code{strptime()} could fail. An example was French on 7027 OS X, where \samp{juin} is abbreviated to \samp{jui} and partially 7028 matches \code{juillet}. Similarly for weekday names. 7029 7030 \item \code{pbeta(x, a, b, log.p = TRUE)} sometimes underflowed to 7031 zero for very small and very differently sized \code{a}, \code{b}. 7032 (\PR{15641}) 7033 7034 \item \code{approx()} and \code{approxfun()} now handle infinite 7035 values with the \code{"constant"} method. (\PR{15655}) 7036 7037 \item \code{stripchart()} again respects reversed limits in 7038 \code{xlim} and \code{ylim}. (\PR{15664}) 7039 } 7040 } 7041} 7042 7043\section{\Rlogo CHANGES IN R 3.0.2}{ 7044 \subsection{NEW FEATURES}{ 7045 \itemize{ 7046 \item The \file{NEWS} files have been re-organized. 7047 7048 This file contains news for \R >= 3.0.0: news for the 0.x.y, 1.x.y 7049 and 2.x.y releases is in files \file{NEWS.0}, \file{NEWS.1} and 7050 \file{NEWS.2}. The latter files are now installed when \R is 7051 installed. An HTML version of news from 2.10.0 to 2.15.3 is 7052 available as \file{doc/html/NEWS.2.html}. 7053 7054 \item \code{sum()} for integer arguments now uses an integer 7055 accumulator of at least 64 bits and so will be more accurate in 7056 the very rare case that a cumulative sum exceeds 7057 \eqn{2^{53}}{2^53} (necessarily summing more than 4 million 7058 elements). 7059 7060 \item The \code{example()} and \code{tools::Rd2ex()} functions now 7061 have parameters to allow them to ignore \code{\\dontrun} markup in 7062 examples. (Suggested by Peter Solymos.) 7063 7064 \item \code{str(x)} is considerably faster for very large lists, 7065 or factors with 100,000 levels, the latter as in \PR{15337}. 7066 7067 \item \code{col2rgb()} now converts factors to character strings 7068 not integer codes (suggested by Bryan Hanson). 7069 7070 \item \code{tail(warnings())} now works, \emph{via} the new 7071 \code{`[`} method. 7072 7073 \item There is now support for the LaTeX style file \file{zi4.sty} 7074 which has in some distributions replaced \file{inconsolata.sty}. 7075 7076 \item \code{unlist(x)} now typically returns all non-list 7077 \code{x}s unchanged, not just the \dQuote{vector} ones. 7078 Consequently, \code{format(lst)} now also works when the list 7079 \code{lst} has non-vector elements. 7080 7081 \item The \code{tools::getVignetteInfo()} function has been added 7082 to give information about installed vignettes. 7083 7084 \item New \code{assertCondition()}, etc. utilities in \pkg{tools}, useful 7085 for testing. 7086 7087 \item Profiling now records non-inlined calls from byte-compiled 7088 code to \code{BUILTIN} functions. 7089 7090 \item Various functions in \pkg{stats} and elsewhere that use 7091 non-standard evaluation are now more careful to follow the 7092 namespace scoping rules. E.g., \code{stats::lm()} can now find 7093 \code{stats::model.frame()} even if \pkg{stats} is not on the 7094 search path or if some package defines a function of that name. 7095 7096 \item If an invalid/corrupt \code{.Random.seed} object is 7097 encountered in the workspace it is ignored with a warning rather 7098 than giving an error. (This allows \R itself to rely on a working 7099 RNG, e.g.\sspace{}to choose a random port.) 7100 7101 \item \code{seq()} and \code{seq.int()} give more explicit error 7102 messages if called with invalid (e.g., \code{NaN}) inputs. 7103 7104 \item When \code{parse()} finds a syntax error, it now makes 7105 partial parse information available up to the location of the 7106 error. (Request of Reijo Sund.) 7107 7108 \item Methods invoked by \code{NextMethod()} had a different 7109 dynamic parent to the generic. This was causing trouble where S3 7110 methods invoked \emph{via} lazy evaluation could lose track of 7111 their generic. (\PR{15267}) 7112 7113 \item Code for the negative binomial distribution now treats the case 7114 \code{size == 0} as a one-point distribution at zero. 7115 7116 \item \code{abbreviate()} handles without warning non-ASCII input 7117 strings which require no abbreviation. 7118 7119 \item \code{read.dcf()} no longer has a limit of 8191 bytes per 7120 line. (Wish of \PR{15250}.) 7121 7122 \item \code{formatC(x)} no longer copies the class of \code{x} to 7123 the result, to avoid misuse creating invalid objects as in 7124 \PR{15303}. A warning is given if a class is discarded. 7125 7126 \item Dataset \code{npk} has been copied from \CRANpkg{MASS} to 7127 allow more tests to be run without recommended packages being 7128 installed. 7129 7130 \item The initialization of the regression coefficients for 7131 non-degenerate differenced models in \code{arima()} has been 7132 changed and in some examples avoids a local maximum. (\PR{15396}) 7133 7134 \item \code{termplot()} now has an argument \code{transform.x} 7135 to control the display of individual terms in the plot. 7136 (\PR{15329}) 7137 7138 \item \code{format()} now supports \code{digits = 0}, to 7139 display \code{nsmall} decimal places. 7140 7141 \item There is a new read-only \code{par()} parameter called 7142 \code{"page"}, which returns a logical value indicating whether 7143 the next \code{plot.new()} call will start a new page. 7144 7145 \item Processing Sweave and Rd documents to PDF now renders 7146 backticks and single quotes better in several instances, including 7147 in \samp{\\code} and \samp{\\samp} expressions. 7148 7149 \item \code{utils::modifyList()} gets a new argument \code{keep.null} 7150 allowing \code{NULL} components in the replacement to be retained, 7151 instead of causing corresponding components to be deleted. 7152 7153 \item \code{tools::pkgVignettes()} gains argument \code{check}; 7154 if set to \code{TRUE}, it will warn when it appears a vignette requests 7155 a non-existent vignette engine. 7156 } 7157 } 7158 7159 \subsection{UTILITIES}{ 7160 \itemize{ 7161 \item \command{R CMD check --as-cran} checks the line widths in 7162 usage and examples sections of the package Rd files. 7163 7164 \item \command{R CMD check --as-cran} now implies \option{--timings}. 7165 7166 \item \command{R CMD check} looks for command \command{gfile} if a 7167 suitable \command{file} is not found. (Although \command{file} is 7168 not from GNU, OpenCSW on Solaris installs it as \command{gfile}.) 7169 7170 \item \command{R CMD build} (with the internal \code{tar}) checks 7171 the permissions of \file{configure} and \file{cleanup} files and 7172 adds execute permission to the recorded permissions for these 7173 files if needed, with a warning. This is useful on OSes and file 7174 systems which do not support execute permissions (notably, on 7175 Windows). 7176 7177 \item \command{R CMD build} now weaves and tangles all vignettes, 7178 so suggested packages are not required during package installation 7179 if the source tarball was prepared with current 7180 \command{R CMD build}. 7181 7182 \item \code{checkFF()} (used by \command{R CMD check}) does a 7183 better job of detecting calls from other packages, including not 7184 reporting those where a function has been copied from another 7185 namespace (e.g., as a default method). It now reports calls where 7186 \code{.NAME} is a symbol registered in another package. 7187 7188 \item On Unix-alike systems, \command{R CMD INSTALL} now installs packages 7189 group writably whenever the library (\code{lib.loc}) is group 7190 writable. Hence, \code{update.packages()} works for other group 7191 members (suggested originally and from a patch by Dirk Eddelbuettel). 7192 7193 \item \command{R CMD javareconf} now supports the use of symbolic 7194 links for \env{JAVA_HOME} on platforms which have 7195 \command{realpath}. So it is now possible to 7196 use \preformatted{R CMD javareconf JAVA_HOME=/usr/lib/jvm/java-1.7.0} 7197 on a Linux system and record that value rather than the 7198 frequently-changing full path such as 7199 \file{/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25.x86_64}. 7200 7201 \item (Windows only.) \command{Rscript -e} requires a non-empty 7202 argument for consistency with Unix versions of \R. (Also 7203 \command{Rterm -e} and \command{R -e}.) 7204 7205 \item \command{R CMD check} does more thorough checking of 7206 declared packages and namespaces. It reports 7207 \itemize{ 7208 \item packages declared in more than one of the 7209 \samp{Depends}, \samp{Imports}, \samp{Suggests} and 7210 \samp{Enhances} fields of the \file{DESCRIPTION} file. 7211 7212 \item namespaces declared in \samp{Imports} but not 7213 imported from, neither in the \file{NAMESPACE} file nor using 7214 the \code{::} nor \code{:::} operators. 7215 7216 \item packages which are used in \code{library()} or 7217 \code{requires()} calls in the \R code but were already put on 7218 the search path \emph{via} \samp{Depends}. 7219 7220 \item packages declared in \samp{Depends} not imported 7221 \emph{via} the \file{NAMESPACE} file (except the standard 7222 packages). Objects used from \samp{Depends} packages should be 7223 imported to avoid conflicts and to allow correct operation when 7224 the namespace is loaded but not attached. 7225 7226 \item objects imported \emph{via} \code{:::} calls where 7227 \code{::} would do. 7228 7229 \item objects imported by \code{::} which are not exported. 7230 7231 \item objects imported by \code{:::} calls which do not exist. 7232 } 7233 See \sQuote{Writing R Extensions} for good practice. 7234 7235 \item \command{R CMD check} optionally checks for non-standard 7236 top-level files and directories (which are often mistakes): this 7237 is enabled for \option{--as-cran}. 7238 7239 \item LaTeX style file \code{upquote.sty} is no longer included 7240 (the version was several years old): it is no longer used in \R. 7241 A much later version is commonly included in LaTeX distributions 7242 but does not play well with the \code{ae} fonts which are the 7243 default for Sweave vignettes. 7244 7245 \item \command{R CMD build} makes more use of the \file{build} 7246 sub-directory of package sources, for example to record 7247 information about the vignettes. 7248 7249 \item \command{R CMD check} analyses \code{:::} calls. 7250 } 7251 } 7252 7253 \subsection{INSTALLATION and INCLUDED SOFTWARE}{ 7254 \itemize{ 7255 \item The macros used for the texinfo manuals have been changed to 7256 work better with the incompatible changes made in \command{texinfo 7257 5.x}. 7258 7259 \item The minimum version for a system \code{xz} library is now 7260 5.0.3 (was 4.999). This is in part to avoid 5.0.2, which can 7261 compress in ways other versions cannot decompress. 7262 7263 \item The included version of PCRE has been updated to 8.33. 7264 7265 \item The included version of \code{zlib} has been updated to 7266 1.2.8, a bug-fix release. 7267 7268 \item The included version of xz utils's \code{liblzma} has been 7269 updated to 5.0.5. 7270 7271 \item Since \command{javareconf} (see above) is used when \R is 7272 installed, a stable link for \env{JAVA_HOME} can be supplied then. 7273 7274 \item Configuring with \option{--disable-byte-compilation} will 7275 override the \file{DESCRIPTION} files of recommended packages, 7276 which typically require byte-compilation. 7277 7278 \item More of the installation and checking process will work even 7279 when \env{TMPDIR} is set to a path containing spaces, but this is 7280 not recommended and external software (such as 7281 \command{texi2dvi}) may fail. 7282 } 7283 } 7284 7285 \subsection{PACKAGE INSTALLATION}{ 7286 \itemize{ 7287 \item Installation is aborted immediately if a \code{LinkingTo} 7288 package is not installed. 7289 7290 \item \command{R CMD INSTALL} has a new option 7291 \code{--no-byte-compile} which will override a \samp{ByteCompile} 7292 field in the package's \file{DESCRIPTION} file. 7293 7294 \item License \samp{BSD} is deprecated: use \samp{BSD_3_clause} 7295 or \samp{BSD_2_clause} instead. 7296 7297 License \samp{X11} is deprecated: use \samp{MIT} or 7298 \samp{BSD_2_clause} instead. 7299 7300 \item Version requirements for \code{LinkingTo} packages are now 7301 recognized: they are checked at installation. (Fields with 7302 version requirements were previously silently ignored.) 7303 7304 \item The limit of 500 \code{S3method} entries in a 7305 \code{NAMESPACE} file has been removed. 7306 7307 \item The default \sQuote{version} of Bioconductor for its 7308 packages has been changed to the upcoming \samp{2.13}, but this 7309 can be set by the environment variable \env{R_BIOC_VERSION} when 7310 \R is installed. 7311 } 7312 } 7313 7314 \subsection{C-LEVEL FACILITIES}{ 7315 \itemize{ 7316 \item \file{Rdefines.h} has been tweaked so it can be included in 7317 C++ code after \file{R_ext/Boolean.h} (which is included by 7318 \file{R.h}). 7319 7320 Note that \file{Rdefines.h} is not kept up-to-date, and 7321 \file{Rinternals.h} is preferred for new code. 7322 7323 \item \code{eval} and \code{applyClosure} are now protected 7324 against package code supplying an invalid \code{rho}. 7325 } 7326 } 7327 7328 \subsection{DEPRECATED AND DEFUNCT}{ 7329 \itemize{ 7330 \item The unused \code{namespace} argument to 7331 \code{package.skeleton()} is now formally deprecated and will be 7332 removed in \R 3.1.0. 7333 7334 \item \code{plclust()} is deprecated: use the \code{plot()} method 7335 for class \code{"hclust"} instead. 7336 7337 \item Functions \code{readNEWS()} and \code{checkNEWS()} in 7338 package \pkg{tools} are deprecated (and they have not worked with 7339 current \file{NEWS} files for a long time). 7340 } 7341 } 7342 7343 \subsection{DOCUMENTATION}{ 7344 \itemize{ 7345 \item \sQuote{An Introduction to R} has a new chapter on using \R 7346 as a scripting language including interacting with the OS. 7347 } 7348 } 7349 7350 \subsection{BUG FIXES}{ 7351 \itemize{ 7352 \item \code{help.request()} could not determine the current version 7353 of \R on CRAN. (\PR{15241}) 7354 7355 \item On Windows, \code{file.info()} failed on root directories unless 7356 the path was terminated with an explicit \code{"."}. (\PR{15302}) 7357 7358 \item The \code{regmatches<-()} replacement function mishandled 7359 results coming from \code{regexpr()}. (\PR{15311}) 7360 7361 \item The help for \code{setClass()} and 7362 \code{representation()} still suggested the deprecated argument 7363 \code{representation=}. (\PR{15312}) 7364 7365 \item \command{R CMD config} failed in an installed build of \R 7366 3.0.1 (only) when a sub-architecture was used. (Reported by 7367 Berwin Turlach.) 7368 7369 \item On Windows, the installer modified the \file{etc/Rconsole} 7370 and \file{etc/Rprofile.site} files even when default options were 7371 chosen, so the MD5 sums did not refer to the installed versions. 7372 (Reported by Tal Galili.) 7373 7374 \item \code{plot(hclust(), cex =)} respects \code{cex} again 7375 (and possibly others similarly). (Reported by Peter Langfelder.) 7376 7377 \item If multiple packages were checked by \command{R CMD check}, 7378 and one was written for a different OS, it would set 7379 \command{--no-install} for all following packages as well as 7380 itself. 7381 7382 \item \code{qr.coef()} and related functions did not properly coerce 7383 real vectors to complex when necessary. (\PR{15332}) 7384 7385 \item \code{ftable(a)} now fixes up empty \code{dimnames} such 7386 that the result is printable. 7387 7388 \item \code{package.skeleton()} was not starting its search for 7389 function objects in the correct place if \code{environment} was 7390 supplied. (Reported by Karl Forner.) 7391 7392 \item Parsing code was changing the length field of vectors and 7393 confusing the memory manager. (\PR{15345}) 7394 7395 \item The Fortran routine \code{ZHER2K} in the reference BLAS 7396 had a comment-out bug in two places. 7397 This caused trouble with \code{eigen()} for Hermitian matrices. 7398 (\PR{15345} and report from Robin Hankin) 7399 7400 \item \code{vignette()} and \code{browseVignettes()} did not 7401 display non-Sweave vignettes properly. 7402 7403 \item Two warning/error messages have been corrected: 7404 the (optional) warning produced by a partial name match 7405 with a pairlist, the error message from a zero-length argument to 7406 the \code{:} operator. (Found by Radford Neal; \PR{15358}, 7407 \PR{15356}) 7408 7409 \item \code{svd()} returned \code{NULL} rather than omitting 7410 components as documented. (Found by Radford Neal; \PR{15360}) 7411 7412 \item \code{mclapply()} and \code{mcparallel()} with 7413 \code{silent = TRUE} could break a process that uses 7414 \code{stdout} output 7415 unguarded against broken pipes (e.g., \code{zip} will fail 7416 silently). To work around such issues, they now replace 7417 \code{stdout} with a descriptor pointed to \file{/dev/null} 7418 instead. For this purpose, internal \code{closeStdout} and 7419 \code{closeStderr} functions have gained the \code{to.null} flag. 7420 7421 \item \code{log()}, \code{signif()} and \code{round()} now raise an 7422 error if a single named argument is not named \code{x}. (\PR{15361}) 7423 7424 \item \code{deparse()} now deparses raw vectors in a form that 7425 is syntactically correct. (\PR{15369}) 7426 7427 \item The \code{jpeg} driver in Sweave created a JPEG file, but gave 7428 it a \file{.png} extension. (\PR{15370}) 7429 7430 \item Deparsing of infix operators with named arguments is 7431 improved. (\PR{15350}) 7432 7433 \item \code{mget()}, \code{seq.int()} and \code{numericDeriv()} 7434 did not duplicate arguments properly. (\PR{15352}, \PR{15353}, 7435 \PR{15354}) 7436 7437 \item \code{kmeans(algorithm = "Hartigan-Wong")} now always stops 7438 iterating in the QTran stage. (\PR{15364}). 7439 7440 \item \code{read.dcf()} re-allocated incorrectly and so could 7441 segfault when called on a file with lines of more than 100 bytes. 7442 7443 \item On systems where \code{mktime()} does not set \code{errno}, 7444 the last second before the epoch could not be converted from 7445 \code{POSIXlt} to \code{POSIXct}. (Reported by Bill Dunlap.) 7446 7447 \item \code{add1.glm()} miscalculated F-statistics when df > 1. (Bill 7448 Dunlap, \PR{15386}). 7449 7450 \item \code{stem()} now discards infinite inputs rather than 7451 hanging. (\PR{15376}) 7452 7453 \item The parser now enforces C99 syntax for floating point 7454 hexadecimal constants (e.g., \code{0x1.1p0}), rather than returning 7455 unintended values for malformed constants. (\PR{15234}) 7456 7457 \item \code{model.matrix()} now works with very long LHS 7458 names (more than 500 bytes). (\PR{15377}) 7459 7460 \item \code{integrate()} reverts to the pre-2.12.0 behaviour: from 7461 2.12.0 to 3.0.1 it sometimes failed to achieve the requested 7462 tolerance and reported error estimates that were exceeded. 7463 (\PR{15219}) 7464 7465 \item \code{strptime()} now handles \samp{\%W} fields with value 7466 0. (\PR{15915}) 7467 7468 \item \R is now better protected against people trying to interact 7469 with the console in startup code. (\PR{15325}) 7470 7471 \item Subsetting 1D arrays often lost dimnames (\PR{15301}). 7472 7473 \item Unary \code{+} on a logical vector did not coerce to 7474 integer, although unary \code{-} did. 7475 7476 \item \code{na.omit()} and \code{na.exclude()} added a row 7477 to a zero-row data frame. (\PR{15399}) 7478 7479 \item All the (where necessary cut-down) vignettes are installed 7480 if \R was configured with \option{--without-recommended-packages}. 7481 7482 \item \code{source()} did not display filenames when reporting 7483 syntax errors. 7484 7485 \item Syntax error reports misplaced the caret pointing out the bad 7486 token. 7487 7488 \item (Windows only) Starting \R with \command{R} (instead of 7489 \command{Rterm} or \command{Rgui}) would lose any 7490 zero-length strings from the command line arguments. (\PR{15406}) 7491 7492 \item Errors in the encoding specified on the command line 7493 \emph{via} \command{--encoding=foo} were not handled properly. 7494 (\PR{15405}) 7495 7496 \item If \code{x} is a symbol, \code{is.vector(x, "name")} now 7497 returns \code{TRUE}, since \code{"name"} and \code{"symbol"} 7498 should be synonyms. (Reported by Hervé Pagès.) 7499 7500 \item \command{R CMD rtags} works on platforms (such as OS X) 7501 with a XSI-conformant shell command \command{echo}. (\PR{15231}) 7502 7503 \item \code{is.unsorted(NA)} returns false as documented (rather than 7504 \code{NA}). 7505 7506 \item \command{R CMD LINK} did not know about sub-architectures. 7507 7508 \item \code{system()} and \code{system2()} are better protected 7509 against users who misguidedly have spaces in the temporary 7510 directory path. 7511 7512 \item \code{file.show()} and \code{edit()} are now more likely to 7513 work on file paths containing spaces. (Where external utilities 7514 are used, not the norm on Windows nor in \command{R.app} which 7515 should previously have worked.) 7516 7517 \item Packages using the \pkg{methods} package are more likely to 7518 work when they import it but it is not attached. (Several parts 7519 of its C code were looking for its \R functions on the search path 7520 rather than in its namespace.) 7521 7522 \item \code{lgamma(-x)} is no longer \code{NaN} for very small x. 7523 7524 \item (Windows) \code{system2()} now respects specifying 7525 \code{stdout} and \code{stderr} as files if called from 7526 \command{Rgui}. (\PR{15393}) 7527 7528 \item Closing an \code{x11()} device whilst \code{locator()} or 7529 \code{identify()} is in progress no longer hangs \R. (\PR{15253}) 7530 7531 \item \code{list.dirs(full.names = FALSE)} was not implemented. 7532 (\PR{15170}) 7533 7534 \item \code{format()} sometimes added unnecessary spaces. 7535 (\PR{15411}) 7536 7537 \item \code{all.equal(check.names = FALSE)} would ignore the request 7538 to ignore the names and would check them as attributes. 7539 7540 \item The symbol set by \code{tools::Rd2txt_options(itemBullet=)} 7541 was not respected in some locales. (\PR{15435}) 7542 7543 \item \code{mcMap()} was not exported by package 7544 \pkg{parallel}. (\PR{15439}) 7545 7546 \item \code{plot()} for \code{TukeyHSD} objects did not balance 7547 \code{dev.hold()} and \code{dev.flush()} calls on multi-page plots. 7548 (\PR{15449}) 7549 } 7550 } 7551} 7552 7553\section{\Rlogo CHANGES IN R 3.0.1}{ 7554 \subsection{NEW FEATURES}{ 7555 \itemize{ 7556 \item \code{chooseCRANmirror()} and \code{chooseBioCmirror()} gain 7557 an \code{ind} argument (like \code{setRepositories()}). 7558 7559 \item \code{mcparallel} has a new argument \code{mc.interactive} 7560 which can modify the interactive flag in the child process. The 7561 new default is \code{FALSE} which makes child processes 7562 non-interactive by default (this prevents lock-ups due to children 7563 waiting for interactive input). 7564 7565 \item \code{scan()} now warns when end-of-file occurs within 7566 a quoted string. 7567 7568 \item \code{count.fields()} is now consistent with \code{scan()} 7569 in its handling of newlines in quoted strings. Instead of 7570 triggering an error, this results in the current line receiving 7571 \code{NA} as the field count, with the next line getting the total 7572 count of the two lines. 7573 7574 \item The default method of \code{image()} will plot axes of the 7575 class of \code{xlim} and \code{ylim} (and hence of \code{x} and 7576 \code{y} if there is a suitable \code{range()} method). Based on 7577 a suggestion of Michael Sumner. 7578 7579 \item \code{load()} now has a \code{verbose} argument for 7580 debugging support, to print the names of objects just before 7581 loading them. 7582 7583 \item When loading a serialized object encounters a reference to a 7584 namespace which cannot be loaded, this is replaced by a reference 7585 to the global environment, with a warning. 7586 7587 \item \code{pairs()} gains a \code{line.main} option for title placement. 7588 7589 \item The remaining instances in which serialization to a raw 7590 vector was limited to 2GB have been unlimited on a 64-bit 7591 platform, and in most cases serialization to a vector of more than 7592 1GB will be substantially faster. 7593 } 7594 } 7595 7596 \subsection{UTILITIES}{ 7597 \itemize{ 7598 \item \command{R CMD config} now make use of personal 7599 \file{Makevars} files under \file{~/.R} and a site file 7600 \file{Makevars.site}, in the same way as \command{R CMD SHLIB} and 7601 \command{R CMD INSTALL}. This makes the utility more useful in 7602 package \command{configure} scripts. 7603 7604 On Windows finding the personal files may require the environment 7605 variable \env{HOME} set. 7606 7607 The old behaviour can be obtained with the new options 7608 \option{--no-user-files} and \option{--no-site-files}. 7609 } 7610 } 7611 7612 \subsection{PACKAGE INSTALLATION}{ 7613 \itemize{ 7614 \item Alternatives to the site and user customization files 7615 \file{Makevars.site} and \file{~/.R/Makevars} can be specified 7616 \emph{via} the environment variables \env{R_MAKEVARS_SITE} and 7617 \env{R_MAKEVARS_USER} respectively. These can be used to suppress 7618 the use of the default files by setting an empty value (where 7619 possible) or a non-existent path. 7620 } 7621 } 7622 7623 \subsection{BUG FIXES}{ 7624 \itemize{ 7625 \item \code{sys.source()} did not report error locations when 7626 \code{keep.source = TRUE}. 7627 7628 \item \code{as.POSIXct.numeric} was coercing \code{origin} using 7629 the \code{tz} argument and not \code{"GMT"} as documented 7630 (\PR{14973}). 7631 7632 \item The active binding to assign fields in reference classes 7633 has been cleaned up to reduce dependence on the class' package 7634 environment, also fixing bug in initializing read-only fields 7635 (inspired by a report from Hadley Wickham). 7636 7637 \item \code{str(d)} no longer gives an error when \code{names(d)} 7638 contain illegal multibyte strings (\PR{15247}). 7639 7640 \item Profiling of built-in functions with \code{line.profiling= 7641 TRUE} did not record the line from which they were called. 7642 7643 \item \code{citation(pkg)} dropped the header and footer specified 7644 in the \file{CITATION} file (\PR{15257}). 7645 7646 \item Quotes were handled differently when reading the first line 7647 and reading the rest, so \code{read.table()} misread some files 7648 that contained quote characters (\PR{15245}). 7649 7650 \item \code{cat()} with \code{sep} a character vector of length 7651 greater than one and more than one argument was using separators 7652 inconsistently (\PR{15261}). 7653 7654 \item On Windows in \R 3.0.0, \code{savePlot()} failed because of 7655 an incorrect check on the argument count. 7656 7657 \item \code{unzip(list = TRUE)} returned \code{Names} as a factor 7658 and not a character vector (as documented) for the internal method. 7659 (Noticed by Sean O'Riordain.) 7660 7661 \item \code{contourLines()} now checks more comprehensively for 7662 conformance of its \code{x}, \code{y} and \code{z} arguments (it 7663 was used incorrectly in package \CRANpkg{R2G2}). 7664 7665 \item Saved graphics display lists are \R version-specific. 7666 Attempting to load workspaces containing them (or some other 7667 version-specific objects) aborted the load in \R 3.0.0 and 7668 earlier; now it does a partial load and generates a warning 7669 instead. 7670 7671 \item In \R 3.0.0, \code{identify()} and \code{locator()} did 7672 not record information correctly, so replaying a graph (e.g., by 7673 copying it to another device) would fail. (\PR{15271}) 7674 7675 \item Calling \code{file.copy()} or \code{dirname()} with the 7676 invalid input \code{""} (which was being used in packages, despite 7677 not being a file path) could have caused a segfault. 7678 7679 \code{dirname("")} is now \code{""} rather than \code{"."} (unless 7680 it segfaulted). 7681 7682 \item \code{supsmu()} could read/write outside its input vectors 7683 for very short inputs (seen in package \CRANpkg{rms} for \code{n = 4}). 7684 7685 \item \code{as.dendrogram()}'s \code{hclust} method uses less 7686 memory and hence gets considerably faster for large (n ~ 1000) 7687 clusterings, thanks to Daniel Müllner. (\PR{15174}) 7688 7689 \item The return value when all workers failed from 7690 \code{parallel::mclapply(mc.preschedule = TRUE)} was a list of 7691 strings and not of error objects. (Spotted by Karl Forner and 7692 Bernd Bischl.) 7693 7694 \item In \R 3.0.0, when \code{help()} found multiple pages with 7695 the same alias, the HTML display of all the selections was not 7696 produced. (\PR{15282}) 7697 7698 \item \code{splinefun(method="monoH.FC")} now produces a 7699 function with first argument named \code{x} and allows 7700 \code{deriv=3}, as documented. (\PR{15273}) 7701 7702 \item \code{summaryRprof()} would only read the first 7703 \code{chunksize} lines of an \code{Rprof} file produced with 7704 \code{line.profiling=TRUE}. By default, this is the first 100 7705 seconds. (\PR{15288}) 7706 7707 \item \code{lsfit()} produced an incorrect error message when 7708 argument \code{x} had more columns than rows or \code{x} had a 7709 different number of rows than \code{y}. (Spotted by Renaud Gaujoux.) 7710 7711 \item Binary operations on equal length vectors copied the 7712 class name from the second operand when the first had no 7713 class name, but did not set the object bit. (\PR{15299}) 7714 7715 \item The \code{trace()} method for reference generator objects 7716 failed after those objects became function definitions. 7717 7718 \item \code{write.table()} did not check that factors were 7719 constructed correctly, and so caused a segment fault when 7720 writing bad ones. (\PR{15300}) 7721 7722 \item The internal HTTP server no longer chokes on POST requests 7723 without body. It will also pass-through other request types for 7724 custom handlers (with the method stored in Request-Method header) 7725 instead of failing. 7726 } 7727 } 7728} 7729 7730\section{\Rlogo CHANGES IN R 3.0.0}{ 7731 \subsection{SIGNIFICANT USER-VISIBLE CHANGES}{ 7732 \itemize{ 7733 \item Packages need to be (re-)installed under this version 7734 (3.0.0) of \R. 7735 7736 \item There is a subtle change in behaviour for numeric index 7737 values \eqn{2^{31}}{2^31} and larger. These never used to be 7738 legitimate and so were treated as \code{NA}, sometimes with a 7739 warning. They are now legal for long vectors so there is no 7740 longer a warning, and \code{x[2^31] <- y} will now extend the 7741 vector on a 64-bit platform and give an error on a 32-bit one. 7742 7743 \item It is now possible for 64-bit builds to allocate amounts of 7744 memory limited only by the OS. It may be wise to use OS 7745 facilities (e.g., \command{ulimit} in a \command{bash} shell, 7746 \command{limit} in \command{csh}), to set limits on overall memory 7747 consumption of an \R process, particularly in a multi-user 7748 environment. A number of packages need a limit of at least 4GB of 7749 virtual memory to load. 7750 7751 64-bit Windows builds of \R are by default limited in memory usage 7752 to the amount of RAM installed: this limit can be changed by 7753 command-line option \option{--max-mem-size} or setting environment 7754 variable \env{R_MAX_MEM_SIZE}. 7755 7756 \item Negative numbers for colours are consistently an error: 7757 previously they were sometimes taken as transparent, sometimes 7758 mapped into the current palette and sometimes an error. 7759 } 7760 } 7761 7762 \subsection{NEW FEATURES}{ 7763 \itemize{ 7764 \item \code{identical()} has a new argument, 7765 \code{ignore.environment}, used when comparing functions (with 7766 default \code{FALSE} as before). 7767 7768 \item There is a new option, \code{options(CBoundsCheck=)}, which 7769 controls how \code{.C()} and \code{.Fortran()} pass arguments to 7770 compiled code. If true (which can be enabled by setting the 7771 environment variable \env{R_C_BOUNDS_CHECK} to \samp{yes}), raw, 7772 integer, double and complex arguments are always copied, and 7773 checked for writing off either end of the array on return from the 7774 compiled code (when a second copy is made). This also checks 7775 individual elements of character vectors passed to \code{.C()}. 7776 7777 This is not intended for routine use, but can be very helpful in 7778 finding segfaults in package code. 7779 7780 \item In \code{layout()}, the limits on the grid size have been 7781 raised (again). 7782 7783 \item New simple \code{provideDimnames()} utility function. 7784 7785 \item Where methods for \code{length()} return a double value 7786 which is representable as an integer (as often happens for package 7787 \CRANpkg{Matrix}), this is converted to an integer. 7788 7789 \item Matrix indexing of data frames by two-column numeric indices 7790 is now supported for replacement as well as extraction. 7791 7792 \item \code{setNames()} now has a default for its \code{object} 7793 argument, useful for a character result. 7794 7795 \item \code{StructTS()} has a revised additive constant in the 7796 \code{loglik} component of the result: the previous definition is 7797 returned as the \code{loglik0} component. However, the help page has 7798 always warned of a lack of comparability of log-likelihoods for 7799 non-stationary models. (Suggested by Jouni Helske.) 7800 7801 \item The logic in \code{aggregate.formula()} has been revised. 7802 It is now possible to use a formula stored in a variable; 7803 previously, it had to be given explicitly in the function call. 7804 7805 \item \code{install.packages()} has a new argument \code{quiet} to 7806 reduce the amount of output shown. 7807 7808 \item Setting an element of the graphics argument \code{lwd} to a 7809 negative or infinite value is now an error. Lines corresponding 7810 to elements with values \code{NA} or \code{NaN} are silently 7811 omitted. 7812 7813 Previously the behaviour was device-dependent. 7814 7815 \item Setting graphical parameters \code{cex}, \code{col}, 7816 \code{lty}, \code{lwd} and \code{pch} in \code{par()} now requires a 7817 length-one argument. Previously some silently took the first 7818 element of a longer vector, but not always when documented to do so. 7819 7820 \item \code{Sys.which()} when used with inputs which would be 7821 unsafe in a shell (e.g., absolute paths containing spaces) now uses 7822 appropriate quoting. 7823 7824 \item \code{as.tclObj()} has been extended to handle raw vectors. 7825 Previously, it only worked in the other direction. 7826 (Contributed by Charlie Friedemann, \PR{14939}.) 7827 7828 \item New functions \code{cite()} and \code{citeNatbib()} have 7829 been added, to allow generation of in-text citations from 7830 \code{"bibentry"} objects. A \code{cite()} function may be added 7831 to \code{bibstyle()} environments. 7832 7833 \item A \code{sort()} method has been added for \code{"bibentry"} 7834 objects. 7835 7836 \item The \code{bibstyle()} function now defaults to setting the 7837 default bibliography style. The \code{getBibstyle()} function 7838 has been added to report the name of the current default style. 7839 7840 \item \code{scatter.smooth()} now has an argument \code{lpars} to 7841 pass arguments to \code{lines()}. 7842 7843 \item \code{pairs()} has a new \code{log} argument, to allow some 7844 or all variables to be plotted on logarithmic scale. 7845 (In part, wish of \PR{14919}.) 7846 7847 \item \code{split()} gains a \code{sep} argument. 7848 7849 \item \code{termplot()} does a better job when given a model with 7850 interactions (and no longer attempts to plot interaction terms). 7851 7852 \item The parser now incorporates code from Romain Francois' 7853 \CRANpkg{parser} package, to support more detailed computation on 7854 the code, such as syntax highlighting, comment-based 7855 documentation, etc. Functions \code{getParseData()} and 7856 \code{getParseText()} access the data. 7857 7858 \item There is a new function \code{rep_len()} analogous to 7859 \code{rep.int()} for when speed is required (and names are not). 7860 7861 \item The undocumented use \code{rep(NULL, length.out = n)} for 7862 \code{n > 0} (which returns \code{NULL}) now gives a warning. 7863 7864 \item \code{demo()} gains an \code{encoding} argument for those 7865 packages with non-ASCII demos: it defaults to the package encoding 7866 where there is one. 7867 7868 \item \code{strwrap()} converts inputs with a marked encoding to 7869 the current locale: previously it made some attempt to pass 7870 through as bytes inputs invalid in the current locale. 7871 7872 \item Specifying both \code{rate} and \code{scale} to 7873 \code{[dpqr]gamma} is a warning (if they are essentially the same 7874 value) or an error. 7875 7876 \item \code{merge()} works in more cases where the data frames 7877 include matrices. (Wish of \PR{14974}.) 7878 7879 \item \code{optimize()} and \code{uniroot()} no longer use a 7880 shared parameter object across calls. (\code{nlm()}, 7881 \code{nlminb()} and \code{optim()} with numerical derivatives 7882 still do, as documented.) 7883 7884 \item The \code{all.equal()} method for date-times is now 7885 documented: times are regarded as equal (by default) if they 7886 differ by up to 1 msec. 7887 7888 \item \code{duplicated()} and \code{unique()} gain a \code{nmax} 7889 argument which can be used to make them much more efficient when 7890 it is known that there are only a small number of unique entries. 7891 This is done automatically for factors. 7892 7893 \item Functions \code{rbinom()}, \code{rgeom()}, \code{rhyper()}, 7894 \code{rpois()}, \code{rnbinom(),} \code{rsignrank()} and 7895 \code{rwilcox()} now return integer (not double) vectors. This 7896 halves the storage requirements for large simulations. 7897 7898 \item \code{sort()}, \code{sort.int()} and \code{sort.list()} now 7899 use radix sorting for factors of less than 100,000 levels when 7900 \code{method} is not supplied. So does \code{order()} if called 7901 with a single factor, unless \code{na.last = NA}. 7902 7903 \item \code{diag()} as used to generate a diagonal matrix has been 7904 re-written in C for speed and less memory usage. It now forces 7905 the result to be numeric in the case \code{diag(x)} since it is 7906 said to have \sQuote{zero off-diagonal entries}. 7907 7908 \item \code{backsolve()} (and \code{forwardsolve()}) are now 7909 internal functions, for speed and support for large matrices. 7910 7911 \item More matrix algebra functions (e.g., \code{chol()} and 7912 \code{solve()}) accept logical matrices (and coerce to numeric). 7913 7914 \item \code{sample.int()} has some support for \eqn{n \ge 7915 2^{31}}{n >= 2^31}: see its help for the limitations. 7916 7917 A different algorithm is used for \code{(n, size, replace = FALSE, 7918 prob = NULL)} for \code{n > 1e7} and \code{size <= n/2}. This 7919 is much faster and uses less memory, but does give different results. 7920 7921 \item \code{approxfun()} and \code{splinefun()} now return a 7922 wrapper to an internal function in the \pkg{stats} namespace 7923 rather than a \code{.C()} or \code{.Call()} call. This is more 7924 likely to work if the function is saved and used in a different 7925 session. 7926 7927 \item The functions \code{.C()}, \code{.Call()}, 7928 \code{.External()} and \code{.Fortran()} now give an error (rather 7929 than a warning) if called with a named first argument. 7930 7931 \item \code{Sweave()} by default now reports the locations in 7932 the source file(s) of each chunk. 7933 7934 \item \code{clearPushBack()} is now a documented interface to a 7935 long-existing internal call. 7936 7937 \item \code{aspell()} gains filters for \R code, Debian Control 7938 Format and message catalog files, and support for \R level 7939 dictionaries. In addition, package \pkg{utils} now provides 7940 functions \code{aspell_package_R_files()} and 7941 \code{aspell_package_C_files()} for spell checking \R and C level 7942 message strings in packages. 7943 7944 \item \code{bibentry()} gains some support for \dQuote{incomplete} 7945 entries with a \samp{crossref} field. 7946 7947 \item \code{gray()} and \code{gray.colors()} finally allow 7948 \code{alpha} to be specified. 7949 7950 \item \code{monthplot()} gains parameters to control the look of 7951 the reference lines. (Suggestion of Ian McLeod.) 7952 7953 \item Added support for new \code{\%~\%} relation 7954 (\dQuote{is distributed as}) in plotmath. 7955 7956 \item \code{domain = NA} is accepted by \code{gettext()} and 7957 \code{ngettext()}, analogously to \code{stop()} etc. 7958 7959 \item \code{termplot()} gains a new argument \code{plot = FALSE} 7960 which returns information to allow the plots to be modified for 7961 use as part of other plots, but does not plot them. 7962 (Contributed by Terry Therneau, \PR{15076}.) 7963 7964 \item \code{quartz.save()}, formerly an undocumented part of 7965 \command{R.app}, is now available to copy a device to a 7966 \code{quartz()} device. \code{dev.copy2pdf()} optionally does 7967 this for PDF output: \code{quartz.save()} defaults to PNG. 7968 7969 \item The default method of \code{pairs()} now allows 7970 \code{text.panel = NULL} and the use of \code{<foo>.panel = NULL} 7971 is now documented. 7972 7973 \item \code{setRefClass()} and \code{getRefClass()} now return 7974 class generator functions, similar to \code{setClass()}, but 7975 still with the reference fields and methods as before 7976 (suggestion of Romain Francois). 7977 7978 \item New functions \code{bitwNot()}, \code{bitwAnd()}, 7979 \code{bitwOr()} and \code{bitwXor()}, using the internal 7980 interfaces previously used for classes \code{"octmode"} and 7981 \code{"hexmode"}. 7982 7983 Also \code{bitwShiftL()} and \code{bitwShiftR()} for shifting bits 7984 in elements of integer vectors. 7985 7986 \item New option \code{"deparse.cutoff"} to control the deparsing 7987 of language objects such as calls and formulae when printing. 7988 (Suggested by a comment of Sarah Goslee.) 7989 7990 \item \code{colors()} gains an argument \code{distinct}. 7991 7992 \item New \code{demo(colors)} and \code{demo(hclColors)}, with 7993 utility functions. 7994 7995 \item \code{list.files()} (aka \code{dir()}) gains a new optional 7996 argument \code{no..} which allows to exclude \code{"."} and 7997 \code{".."} from listings. 7998 7999 \item Multiple time series are also of class \code{"matrix"}; 8000 consequently, \code{head()}, e.g., is more useful. 8001 8002 \item \code{encodeString()} preserves UTF-8 marked encodings. 8003 Thus if factor levels are marked as UTF-8 an attempt is made to 8004 print them in UTF-8 in \command{RGui} on Windows. 8005 8006 \item \code{readLines()} and \code{scan()} (and hence 8007 \code{read.table()}) in a UTF-8 locale now discard a UTF-8 8008 byte-order-mark (BOM). Such BOMs are allowed but not recommended 8009 by the Unicode Standard: however Microsoft applications can 8010 produce them and so they are sometimes found on websites. 8011 8012 The encoding name \code{"UTF-8-BOM"} for a connection will 8013 ensure that a UTF-8 BOM is discarded. 8014 8015 \item \code{mapply(FUN, a1, ..)} now also works when \code{a1} (or 8016 a further such argument) needs a \code{length()} method (which the 8017 documented arguments never do). (Requested by Hervé Pagès; with a 8018 patch.) 8019 8020 \item \code{.onDetach()} is supported as an alternative to 8021 \code{.Last.lib}. Unlike \code{.Last.lib}, this does not need to 8022 be exported from the package's namespace. 8023 8024 \item The \code{srcfile} argument to \code{parse()} may now be a 8025 character string, to be used in error messages. 8026 8027 \item The \code{format()} method for \code{ftable} objects gains 8028 a \code{method} argument, propagated to \code{write.ftable()} and 8029 \code{print()}, allowing more compact output, notably for LaTeX 8030 formatting, thanks to Marius Hofert. 8031 8032 \item The \code{utils::process.events()} function has been added 8033 to trigger immediate event handling. 8034 8035 \item \code{Sys.which()} now returns \code{NA} (not \code{""}) for 8036 \code{NA} inputs (related to \PR{15147}). 8037 8038 \item The \code{print()} method for class \code{"htest"} gives 8039 fewer trailing spaces (wish of \PR{15124}). 8040 8041 Also print output from \code{HoltWinters()}, \code{nls()} and others. 8042 8043 \item \code{loadNamespace()} allows a version specification to be 8044 given, and this is used to check version specifications given in 8045 the \samp{Imports} field when a namespace is loaded. 8046 8047 \item \code{setClass()} has a new argument, \code{slots}, clearer 8048 and less ambiguous than \code{representation}. It is recommended 8049 for future code, but should be back-compatible. At the same time, 8050 the allowed slot specification is slightly more general. See the 8051 documentation for details. 8052 8053 \item \code{mget()} now has a default for \code{envir} (the frame 8054 from which it is called), for consistency with \code{get()} and 8055 \code{assign()}. 8056 8057 \item \code{close()} now returns an integer status where available, 8058 invisibly. (Wish of \PR{15088}.) 8059 8060 \item The internal method of \code{tar()} can now store paths too 8061 long for the \samp{ustar} format, using the (widely supported) GNU 8062 extension. It can also store long link names, but these are much 8063 less widely supported. There is support for larger files, up to 8064 the \samp{ustar} limit of 8GB. 8065 8066 \item Local reference classes have been added to package 8067 \pkg{methods}. These are a technique for avoiding unneeded 8068 copying of large components of objects while retaining standard \R 8069 functional behavior. See \code{?LocalReferenceClasses}. 8070 8071 \item \code{untar()} has a new argument \code{restore_times} which 8072 if false (not the default) discards the times in the tarball. 8073 This is useful if they are incorrect (some tarballs submitted to 8074 \acronym{CRAN} have times in a local time zone or many years in the 8075 past even though the standard required them to be in UTC). 8076 8077 \item \code{replayplot()} cannot (and will not attempt to) replay 8078 plots recorded under \R < 3.0.0. It may crash the \R session if 8079 an attempt is made to replay plots created in a different build of 8080 \R >= 3.0.0. 8081 8082 \item Palette changes get recorded on the display list, so 8083 replaying plots (including when resizing screen devices and using 8084 \code{dev.copy()}) will work better when the palette is changed 8085 during a plot. 8086 8087 \item \code{chol(pivot = TRUE)} now defaults to LAPACK, not LINPACK. 8088 8089 \item The \code{parse()} function has a new parameter 8090 \code{keep.source}, which defaults to \code{options("keep.source")}. 8091 8092 \item Profiling \emph{via} \code{Rprof()} now optionally records 8093 information at the statement level, not just the function level. 8094 8095 \item The \code{Rprof()} function now quotes function names in 8096 in its output file on Windows, to be consistent with the quoting 8097 in Unix. 8098 8099 \item Profiling \emph{via} \code{Rprof()} now optionally records 8100 information about time spent in GC. 8101 8102 \item The HTML help page for a package now displays non-vignette 8103 documentation files in a more accessible format. 8104 8105 \item To support \code{options(stringsAsFactors = FALSE)}, 8106 \code{model.frame()}, \code{model.matrix()} and 8107 \code{replications()} now automatically convert character 8108 vectors to factors without a warning. 8109 8110 \item The \code{print} method for objects of class \code{"table"} 8111 now detects tables with 0-extents and prints the results as, e.g., 8112 \samp{< table of extent 0 x 1 x 2 >}. (Wish of \PR{15198}.) 8113 8114 \item Deparsing involving calls to anonymous functions has been 8115 made closer to reversible by the addition of extra parentheses. 8116 8117 \item The function \code{utils::packageName()} has been added as 8118 a lightweight version of \code{methods::getPackageName()}. 8119 8120 \item \code{find.package(lib.loc = NULL)} now treats loaded 8121 namespaces preferentially in the same way as attached packages 8122 have been for a long time. 8123 8124 \item In Windows, the Change Directory dialog now defaults to 8125 the current working directory, rather than to the last directory 8126 chosen in that dialog. 8127 8128 \item \code{available.packages()} gains a 8129 \code{"license/restricts_use"} filter which retains only packages 8130 for which installation can proceed solely based on packages which 8131 are guaranteed not to restrict use. 8132 8133 \item New \code{check_packages_in_dir()} function in package 8134 \pkg{tools} for conveniently checking source packages along with 8135 their reverse dependencies. 8136 8137 \item R's completion mechanism has been improved to handle help 8138 requests (starting with a question mark). In particular, help 8139 prefixes are now supported, as well as quoted help topics. To 8140 support this, completion inside quotes are now handled by R by 8141 default on all platforms. 8142 8143 \item The memory manager now allows the strategy used to balance 8144 garbage collection and memory growth to be controlled by setting 8145 the environment variable \env{R_GC_MEM_GROW}. See \code{?Memory} 8146 for more details. 8147 8148 \item (\sQuote{For experts only}, as the introductory manual 8149 says.) The use of environment variables \env{R_NSIZE} and 8150 \env{R_VSIZE} to control the initial (= minimum) garbage 8151 collection trigger for number of cons cels and size of heap has 8152 been restored: they can be overridden by the command-line options 8153 \code{--min-nsize} and \code{--min-vsize}; see \code{?Memory}. 8154 8155 \item On Windows, the device name for bitmap devices as reported 8156 by \code{.Device} and \code{.Devices} no longer includes the file 8157 name. This is for consistency with other platforms and was 8158 requested by the \CRANpkg{lattice} maintainer. 8159 8160 \code{win.metafile()} still uses the file name: the exact form is 8161 used by package \CRANpkg{tkrplot}. 8162 8163 \item \code{set.seed(NULL)} re-initializes \code{.Random.seed} as 8164 done at the beginning of the session if not already set. 8165 (Suggestion of Bill Dunlap.) 8166 8167 \item The \code{breaks} argument in \code{hist.default()} can now be 8168 a function that returns the breakpoints to be used (previously it 8169 could only return the suggested number of breakpoints). 8170 8171 \item File \file{share/licenses/licenses.db} has some 8172 clarifications, especially as to which variants of \sQuote{BSD} 8173 and \sQuote{MIT} is intended and how to apply them to packages. 8174 The problematic licence \sQuote{Artistic-1.0} has been removed. 8175 } 8176 } 8177 8178 \subsection{LONG VECTORS}{ 8179 This section applies only to 64-bit platforms. 8180 \itemize{ 8181 \item There is support for vectors longer than \eqn{2^{31}-1}{2^31 8182 - 1} elements. This applies to raw, logical, integer, double, 8183 complex and character vectors, as well as lists. (Elements of 8184 character vectors remain limited to \eqn{2^{31}-1}{2^31 - 1} 8185 bytes.) 8186 8187 \item Most operations which can sensibly be done with long vectors 8188 work: others may return the error \sQuote{long vectors not 8189 supported yet}. Most of these are because they explicitly work 8190 with integer indices (e.g., \code{anyDuplicated()} and 8191 \code{match()}) or because other limits (e.g., of character strings 8192 or matrix dimensions) would be exceeded or the operations would be 8193 extremely slow. 8194 8195 \item \code{length()} returns a double for long vectors, and 8196 lengths can be set to \eqn{2^{31}}{2^31} or more by the 8197 replacement function with a double value. 8198 8199 \item Most aspects of indexing are available. Generally 8200 double-valued indices can be used to access elements beyond 8201 \eqn{2^{31}-1}{2^31 - 1}. 8202 8203 \item There is some support for matrices and arrays with each 8204 dimension less than \eqn{2^{31}}{2^31} but total number of 8205 elements more than that. Only some aspects of matrix algebra work 8206 for such matrices, often taking a very long time. In other cases 8207 the underlying Fortran code has an unstated restriction (as was 8208 found for complex \code{svd()}). 8209 8210 \item \code{dist()} can produce dissimilarity objects for more 8211 than 65536 rows (but for example \code{hclust()} cannot process 8212 such objects). 8213 8214 \item \code{serialize()} to a raw vector is unlimited in size 8215 (except by resources). 8216 8217 \item The C-level function \code{R_alloc} can now allocate 8218 \eqn{2^{35}}{2^35} or more bytes. 8219 8220 \item \code{agrep()} and \code{grep()} will return double vectors 8221 of indices for long vector inputs. 8222 8223 \item Many calls to \code{.C()} have been replaced by 8224 \code{.Call()} to allow long vectors to be supported (now or in 8225 the future). Regrettably several packages had copied the non-API 8226 \code{.C()} calls and so failed. 8227 8228 \item \code{.C()} and \code{.Fortran()} do not accept long vector 8229 inputs. This is a precaution as it is very unlikely that existing 8230 code will have been written to handle long vectors (and the \R 8231 wrappers often assume that \code{length(x)} is an integer). 8232 8233 \item Most of the methods for \code{sort()} work for long vectors. 8234 8235 \code{rank()}, \code{sort.list()} and \code{order()} support 8236 long vectors (slowly except for radix sorting). 8237 8238 \item \code{sample()} can do uniform sampling from a long vector. 8239 } 8240 } 8241 8242 \subsection{PERFORMANCE IMPROVEMENTS}{ 8243 \itemize{ 8244 \item More use has been made of \R objects representing registered 8245 entry points, which is more efficient as the address is provided 8246 by the loader once only when the package is loaded. 8247 8248 This has been done for packages \code{base}, \code{methods}, 8249 \code{splines} and \code{tcltk}: it was already in place for the 8250 other standard packages. 8251 8252 Since these entry points are always accessed by the \R entry 8253 points they do not need to be in the load table which can be 8254 substantially smaller and hence searched faster. This does mean 8255 that \code{.C} / \code{.Fortran} / \code{.Call} calls copied from 8256 earlier versions of \R may no longer work -- but they were never 8257 part of the API. 8258 8259 \item Many \code{.Call()} calls in package \pkg{base} have been 8260 migrated to \code{.Internal()} calls. 8261 8262 \item \code{solve()} makes fewer copies, especially when \code{b} 8263 is a vector rather than a matrix. 8264 8265 \item \code{eigen()} makes fewer copies if the input has dimnames. 8266 8267 \item Most of the linear algebra functions make fewer copies when 8268 the input(s) are not double (e.g., integer or logical). 8269 8270 \item A foreign function call (\code{.C()} etc) in a package 8271 without a \code{PACKAGE} argument will only look in the first DLL 8272 specified in the \file{NAMESPACE} file of the package rather than 8273 searching all loaded DLLs. A few packages needed \code{PACKAGE} 8274 arguments added. 8275 8276 \item The \code{@<-} operator is now implemented as a primitive, 8277 which should reduce some copying of objects when used. Note that 8278 the operator object must now be in package \pkg{base}: do not try 8279 to import it explicitly from package \pkg{methods}. 8280 } 8281 } 8282 8283 \subsection{PACKAGE INSTALLATION}{ 8284 \itemize{ 8285 \item The transitional support for installing packages without 8286 namespaces (required since \R 2.14.0) has been removed. 8287 \command{R CMD build} will still add a namespace, but a 8288 \code{.First.lib()} function will need to be converted. 8289 8290 \command{R CMD INSTALL} no longer adds a namespace (so 8291 installation will fail), and a \code{.First.lib()} function in a 8292 package will be ignored (with an installation warning for now). 8293 8294 As an exception, packages without a \file{R} directory and no 8295 \file{NAMESPACE} file can still be installed. 8296 8297 \item Packages can specify in their \file{DESCRIPTION file} a line 8298 like \preformatted{ Biarch: yes 8299} 8300 to be installed on Windows with \option{--force-biarch}. 8301 8302 \item Package vignettes can now be processed by other engines 8303 besides \code{Sweave}; see \sQuote{Writing R Extensions} and the 8304 \code{tools::vignetteEngine} help topic for details. 8305 8306 \item The \file{*.R} tangled source code for vignettes is now 8307 included in tarballs when \command{R CMD build} is used to produce 8308 them. In \R 3.0.0, \file{*.R} files not in the sources will be 8309 produced at install time, but eventually this will be dropped. 8310 8311 \item The package type \code{"mac.binary"} now looks in a path in 8312 the repository without any Mac subtype (which used to be 8313 \samp{universal} or \samp{leopard}): it looks in 8314 \file{bin/macosx/contrib/3.0} rather than 8315 \file{bin/macosx/leopard/contrib/2.15}). This is the type used 8316 for the \acronym{CRAN} binary distribution for OS X as from \R 8317 3.0.0. 8318 8319 \item File \file{etc/Makeconf} makes more use of the macros 8320 \code{$(CC)}, \code{$(CXX)}, \code{$(F77)} and \code{$(FC)}, so 8321 the compiler in use can be changed by setting just these (and if 8322 necessary the corresponding flags and \code{FLIBS}) in file 8323 \file{~/.R/Makevars}. 8324 8325 This is convenient for those working with binary distributions of 8326 \R, e.g.\sspace{}on OS X. 8327 } 8328 } 8329 8330 \subsection{UTILITIES}{ 8331 \itemize{ 8332 \item \command{R CMD check} now gives a warning rather than a 8333 note if it finds calls to \code{abort}, \code{assert} or 8334 \code{exit} in compiled code, and has been able to find the 8335 \file{.o} file in which the calls occur. 8336 8337 Such calls can terminate the \R process which loads the package. 8338 8339 \item The location of the build and check environment files can 8340 now be specified by the environment variables 8341 \env{R_BUILD_ENVIRON} and \env{R_CHECK_ENVIRON}, respectively. 8342 8343 \item \command{R CMD Sweave} gains a \option{--compact} option 8344 to control possibly reducing the size of the PDF file it creates 8345 when \option{--pdf} is given. 8346 8347 \item \command{R CMD build} now omits Eclipse's \file{.metadata} 8348 directories, and \command{R CMD check} warns if it finds them. 8349 8350 \item \command{R CMD check} now does some checks on functions 8351 defined within reference classes, including of \code{.Call()} etc 8352 calls. 8353 8354 \item \command{R CMD check --as-cran} notes assignments to the 8355 global environment, calls to \code{data()} which load into the 8356 global environment, and calls to \code{attach()}. 8357 8358 \item \command{R CMD build} by default uses the internal method of 8359 \code{tar()} to prepare the tarball. This is more likely to 8360 produce a tarball compatible with \command{R CMD INSTALL} and 8361 \command{R CMD check}: an external \command{tar} program, 8362 including options, can be specified \emph{via} the environment 8363 variable \env{R_BUILD_TAR}. 8364 8365 \item \code{tools::massageExamples()} is better protected against 8366 packages which re-define base functions such as \code{cat()} and 8367 \code{get()} and so can cause \command{R CMD check} to fail when 8368 checking examples. 8369 8370 \item \command{R CMD javareconf} has been enhanced to be more 8371 similar to the code used by \command{configure}. 8372 8373 There is now a test that a JNI program can be compiled (like 8374 \command{configure} did) and only working settings are used. 8375 8376 It makes use of custom settings from configuration recorded in 8377 \file{etc/javaconf}. 8378 8379 \item The \option{--no-vignettes} argument of \command{R CMD 8380 build} has been renamed to the more accurate 8381 \option{--no-build-vignettes}: its action has always been to 8382 (re)build vignettes and never omitted them. 8383 8384 \command{R CMD check} accepts \option{--no-build-vignettes} as a 8385 preferred synonym for \option{--no-rebuild-vignettes}. 8386 } 8387 } 8388 8389 \subsection{DEPRECATED AND DEFUNCT}{ 8390 \itemize{ 8391 \item The \code{ENCODING} argument to \code{.C()} is defunct. 8392 Use \code{iconv()} instead. 8393 8394 \item The \code{.Internal(eval.with.vis)} non-API function has 8395 been removed. 8396 8397 \item Support for the converters for use with \code{.C()} has been 8398 removed, including the oft misused non-API header 8399 \file{R_ext/RConverters.h}. 8400 8401 \item The previously deprecated uses of \code{array()} with a 8402 0-length \code{dim} argument and \code{tapply()} with a 0-length 8403 \code{INDEX} list are now errors. 8404 8405 \item \samp{Translation} packages are defunct. 8406 8407 \item Calling \code{rep()} or \code{rep.int()} on a pairlist or 8408 other non-vector object is now an error. 8409 8410 \item Several non-API entry points have been transferred to 8411 packages (e.g., \code{R_zeroin2}) or replaced by different non-API 8412 entry points (e.g., \code{R_tabulate}). 8413 8414 \item The \sQuote{internal} graphics device invoked by 8415 \code{.Call("R_GD_nullDevice", package = "grDevices")} has 8416 been removed: use \code{pdf(file = NULL)} instead. 8417 8418 \item The \code{.Fortran()} entry point \code{"dqrls"} which has 8419 not been used by \R since version 2.15.1 is no longer available. 8420 8421 \item Functions \code{traceOn()} and \code{traceOff()} in package 8422 \pkg{methods} are now defunct. 8423 8424 \item Function \code{CRAN.packages()} is finally defunct. 8425 8426 \item Use of \code{col2rgb(0)} is defunct: use \code{par("bg")} or 8427 \code{NA} instead. 8428 8429 \item The long-defunct functions \code{Rd_parse()}, 8430 \code{anovalist.lm()}, \code{categpry()}, \code{clearNames()}, 8431 \code{gammaCody()}, \code{glm.fit.null()}, \code{lm.fit.null()}, 8432 \code{lm.wfit.null()}, \code{manglePackageNames()}, 8433 \code{mauchley.test()}, \code{package.contents()}, 8434 \code{print.coefmat()}, \code{reshapeLong()}, 8435 \code{reshapeWide()}, \code{tkclose()}, \code{tkcmd()}, 8436 \code{tkfile.dir()}, \code{tkfile.tail()}, \code{tkopen()}, 8437 \code{tkputs()}, \code{tkread()}, \code{trySilent()} and 8438 \code{zip.file.extract()} have been removed entirely (but are 8439 still documented in the help system). 8440 8441 \item The unused \code{dataPath} argument to 8442 \code{attachNamespace()} has been removed. 8443 8444 \item \code{grid.prompt()} has been removed: use 8445 \code{devAskNewPage()} instead. 8446 8447 \item The long-deprecated \code{intensities} component is no 8448 longer returned by \code{hist()}. 8449 8450 \item \code{mean()} for data frames and \code{sd()} for data 8451 frames and matrices are defunct. 8452 8453 \item \code{chol(pivot = FALSE, LINPACK = TRUE)}, 8454 \code{ch2inv(LINPACK = TRUE)}, \code{eigen(EISPACK = TRUE)}, 8455 \code{solve(LINPACK = TRUE)} and \code{svd(LINPACK = TRUE)} are 8456 defunct: LAPACK will be used, with a warning. 8457 8458 \item The \code{keep.source} argument to \code{library()} and 8459 \code{require()} is defunct. This option needs to be set 8460 at install time. 8461 8462 \item Documentation for \code{real()}, \code{as.real()} and 8463 \code{is.real()} has been moved to \sQuote{defunct} and the 8464 functions removed. 8465 8466 \item The \code{maxRasters} argument of \code{pdf()} (unused since 8467 \R 2.14.0) has been removed. 8468 8469 \item The unused \code{fontsmooth} argument has been removed from 8470 the \code{quartz()} device. 8471 8472 \item All the (non-API) EISPACK entry points in \R have been removed. 8473 8474 \item \code{chol(pivot = TRUE, LINPACK = TRUE)} is deprecated. 8475 8476 \item The long-deprecated use of \code{\\synopsis} in the 8477 \samp{Usage} section of \file{.Rd} files will be removed in \R 8478 3.1.0. 8479 8480 \item \code{.find.package()} and \code{.path.package()} are 8481 deprecated: only the public versions without the dot have ever 8482 been in the API. 8483 8484 \item In a package's \file{DESCRIPTION} file, \preformatted{ License: X11} 8485 is deprecated, since it includes 8486 \sQuote{Copyright (C) 1996 X Consortium} which cannot be 8487 appropriate for a current \R package. Use \sQuote{MIT} or 8488 \sQuote{BSD_2_clause} instead. 8489 } 8490 } 8491 8492 \subsection{CODE MIGRATION}{ 8493 \itemize{ 8494 \item The C code underlying base graphics has been migrated to the 8495 \pkg{graphics} package (and hence no longer uses 8496 \code{.Internal()} calls). 8497 8498 \item Most of the \code{.Internal()} calls used in the \pkg{stats} 8499 package have been migrated to C code in that package. 8500 8501 This means that a number of \code{.Internal()} calls which have 8502 been used by packages no longer exist, including 8503 \code{.Internal(cor)} \code{.Internal(cov)}, 8504 \code{.Internal(optimhess)} and \code{.Internal(update.formula)}. 8505 8506 \item Some \code{.External()} calls to the \code{base} package 8507 (really to the \R executable or shared library) have been moved to 8508 more appropriate packages. Packages should not have been using 8509 such calls, but some did (mainly those used by \code{integrate()}). 8510 } 8511 } 8512 8513 \subsection{PACKAGE parallel}{ 8514 \itemize{ 8515 \item There is a new function \code{mcaffinity()} which allows 8516 getting or setting the CPU affinity mask for the current \R process on 8517 systems that supports this (currently only Linux has been tested 8518 successfully). It has no effect on systems which do not support 8519 process affinity. Users are not expected to use this function 8520 directly (with the exception of fixing libraries that break 8521 affinity settings like OpenBLAS) -- the function is rather 8522 intended to support affinity control in high-level parallel 8523 functions. In the future, \R may supplement lack of affinity 8524 control in the OS by its own bookkeeping \emph{via} \code{mcaffinity()} 8525 related to processes and threads it spawns. 8526 8527 \item \code{mcparallel()} has a new argument \code{mc.affinity} 8528 which attempts to set the affinity of the child process according 8529 to the specification contained therein. 8530 8531 \item The port used by socket clusters is chosen randomly: this 8532 should help to avoid clashes observed when two users of a 8533 multi-user machine try to create a cluster at the same time. To 8534 reproduce the previous behaviour set environment variable 8535 \env{R_PARALLEL_PORT} to \code{10187}. 8536 } 8537 } 8538 8539 \subsection{C-LEVEL FACILITIES}{ 8540 \itemize{ 8541 \item There has been some minor re-organization of the non-API 8542 header files. In particular, \file{Rinternals.h} no longer 8543 includes the non-API header \file{R_exts/PrtUtil.h}, and that no 8544 longer includes \file{R_exts/Print.h}. 8545 8546 \item Passing \code{NULL} to \code{.C()} is now an error. 8547 8548 \item \code{.C()} and \code{.Fortran()} now warn if 8549 \code{"single"} arguments are used with \code{DUP = FALSE}, as 8550 changes to such arguments are not returned to the caller. 8551 8552 \item C entry points \code{R_qsort} and \code{R_qsort_I} now have 8553 \code{start} and \code{end} as \code{size_t} to allow them to work 8554 with longer vectors on 64-bit platforms. Code using them should 8555 be recompiled. 8556 8557 \item A few recently added C entry points were missing the 8558 remapping to \code{Rf_}, notably \code{[dpq]nbinom_mu}. 8559 8560 \item Some of the interface pointers formerly available only to 8561 \command{R.app} are now available to front-ends on all 8562 Unix-alikes: one has been added for the interface to 8563 \code{View()}. 8564 8565 \item \code{PACKAGE = ""} is now an error in \code{.C()} etc calls: 8566 it was always contrary to the documentation. 8567 8568 \item Entry point \code{rcont2} has been migrated to package 8569 \pkg{stats} and so is no longer available. 8570 8571 \item \code{R_SVN_REVISION} in \file{Rversion.h} is now an integer 8572 (rather than a string) and hence usable as e.g. 8573 \code{#if R_SVN_REVISION < 70000}. 8574 8575 \item The entry points \code{rgb2hsv} and \code{hsv2rgb} have been 8576 migrated to package \pkg{grDevices} and so are no longer available. 8577 8578 \item \code{R_GE_version} has been increased to \code{10} and 8579 \code{name2col} removed (use \code{R_GE_str2col} instead). \R 8580 internal colour codes are now defined using the typedef 8581 \code{rcolor}. 8582 8583 \item The \code{REPROTECT} macro now checks that the protect index 8584 is valid. 8585 8586 \item Several non-API entry points no longer used by \R have been 8587 removed, including the Fortran entry points \code{chol}, 8588 \code{chol2inv}, \code{cg}, \code{ch} and \code{rg}, and the C 8589 entry points \code{Brent_fmin}, \code{fft_factor} and \code{fft_work}. 8590 8591 \item If a \code{.External} call is registered with a number of 8592 arguments (other than \code{-1}), the number of arguments passed 8593 is checked for each call (as for other foreign function calls). 8594 8595 \item It is now possible to write custom connection 8596 implementations outside core R using \file{R_ext/Connections.h}. 8597 Please note that the implementation of connections is still 8598 considered internal and may change in the future (see the above 8599 file for details). 8600 } 8601 } 8602 8603 \subsection{INTERNATIONALIZATION}{ 8604 \itemize{ 8605 \item The management of translations has been converted to \R 8606 code: see \code{?tools::update_pkg_po}. 8607 8608 \item The translations for the \R interpreter and 8609 \command{RGui.exe} are now part of the \pkg{base} package (rather than 8610 having sources in directory \file{po} and being installed to 8611 \file{share/locale}). Thus the \pkg{base} package supports three 8612 translation domains, \code{R-base}, \code{R} and \code{RGui}. 8613 8614 \item The compiled translations which ship with \R are all 8615 installed to the new package \pkg{translations} for easier 8616 updating. The first package of that name found on 8617 \code{.libPaths()} at the start of the \R session will be used. 8618 (It is possible messages will be used before \code{.libPaths()} is 8619 set up in which case the default translations will be used: set 8620 environment variable \env{R_TRANSLATIONS} to point to the location 8621 of the intended \pkg{translations} package to use this right from 8622 the start.) 8623 8624 \item The translations form a separate group in the Windows 8625 installer, so can be omitted if desired. 8626 8627 \item The markup for many messages has been changed to make them 8628 easier to translate, incorporating suggestions from Łukasz Daniel. 8629 } 8630 } 8631 8632 \subsection{INSTALLATION}{ 8633 \itemize{ 8634 \item There is again support for building without using the C 8635 \sQuote{long double} type. This is required by C99, but system 8636 implementations can be slow or flawed. Use \command{configure} 8637 option \option{--disable-long-double}. 8638 8639 \item \command{make pdf} and \command{make install-pdf} now make 8640 and install the full reference index (including all base and 8641 recommended packages). 8642 8643 \item The 'reference manual' on the Windows GUI menu and included 8644 in the installer is now the full reference index, including all 8645 base and recommended packages. 8646 8647 \item \R help pages and manuals have no ISBNs because ISBN 8648 rules no longer allow constantly changing content to be assigned 8649 an ISBN. 8650 8651 \item The Windows installer no longer installs a Start Menu 8652 link to the static help pages; as most pages are generated 8653 dynamically, this led to a lot of broken links. 8654 8655 \item Any custom settings for Java configuration are recorded in 8656 file \file{etc/javaconf} for subsequent use by \command{R CMD 8657 javareconf}. 8658 8659 \item There is now support for \command{makeinfo} version 5.0 8660 (which requires a slightly different \file{.texi} syntax). 8661 8662 \item The minimum versions for \option{--use-system-zlib} and 8663 \code{--use-system-pcre} are now tested as 1.2.5 and 8.10 8664 respectively. 8665 8666 \item On Windows, the stack size is reduced to 16MB on 32-bit 8667 systems: misguided users were launching many threads without 8668 controlling the stack size. 8669 8670 \item \command{configure} no longer looks for file 8671 \file{~/.Rconfig}: \file{~/.R/config} has long been preferred. 8672 } 8673 } 8674 8675 \subsection{BUG FIXES}{ 8676 \itemize{ 8677 \item When \command{R CMD build} is run in an encoding other than 8678 the one specified in the package's \file{DESCRIPTION} file it 8679 tries harder to expand the \code{authors@R} field in the specified 8680 encoding. (\PR{14958}) 8681 8682 \item If \command{R CMD INSTALL} is required to expand the 8683 \code{authors@R} field of the \file{DESCRIPTION} file, it tries 8684 harder to do so in the encoding specified for the package (rather 8685 than using ASCII escapes). 8686 8687 \item Fix in package \pkg{grid} for pushing a viewport into a 8688 layout cell, where the layout is within a viewport that has zero 8689 physical width OR where the layout has zero total relative width 8690 (likewise for height). The layout column widths (or row heights) 8691 in this case were being calculated with non-finite values. 8692 (Reported by Winston Chang.) 8693 8694 \item \code{solve(A, b)} for a vector \code{b} gave the answer 8695 names from \code{colnames(A)} for \code{LINPACK = TRUE} but not in 8696 the default case. 8697 8698 \item \code{La.svd()} accepts logical matrices (as documented, and 8699 as \code{svd()} did). 8700 8701 \item \code{legend()} now accepts negative \code{pch} values, in 8702 the same way \code{points()} long has. 8703 8704 \item Parse errors when installing files now correctly display 8705 the name of the file containing the bad code. 8706 8707 \item In Windows, tcltk windows were not always properly constructed. 8708 (\PR{15150}) 8709 8710 \item The internal functions implementing \code{parse()}, 8711 \code{tools::parseLatex()} and \code{tools::parse_Rd()} were not 8712 reentrant, leading to errors in rare circumstances such as a 8713 garbage collection triggering a recursive call. 8714 8715 \item Field assignments in reference class objects \emph{via} 8716 \code{$<-} were not being checked 8717 because the magic incantation to turn methods on for that 8718 primitive operator had been inadvertently omitted. %$ 8719 8720 \item \code{setHook(hookname, value, action="replace")} set the 8721 hook to be the value, rather than a list containing the value as 8722 documented. (\PR{15167}) 8723 8724 \item If a package used a \file{NEWS.Rd} file, the main HTML 8725 package index page did not link to it. (Reported by Dirk 8726 Eddelbuettel.) 8727 8728 \item The primitive implementation of \code{@<-} was not 8729 checking the class of the replacement. It now does a check, 8730 quicker but less general than \code{slot<-}. See the help. 8731 8732 \item \code{split(x, f)} now recycles classed objects \code{x} in 8733 the same way as vectors. (Reported by Martin Morgan.) 8734 8735 \item \code{pbeta(.28, 1/2, 2200, lower.tail=FALSE, log.p=TRUE)} 8736 is no longer \code{-Inf}; ditto for corresponding \code{pt()} and 8737 \code{pf()} calls, such as \code{pt(45, df=5000, lower.tail=FALSE, 8738 log.p=TRUE)}. (\PR{15162}) 8739 8740 \item The Windows graphics device would crash \R{} if a user 8741 attempted to load the graphics history from a variable that was 8742 not a saved history. (\PR{15230}) 8743 8744 \item The workspace size for the \code{predict()} 8745 method for \code{loess()} could exceed the maximum integer size. 8746 (Reported by Hiroyuki Kawakatsu.) 8747 8748 \item \code{ftable(x, row.vars, col.vars)} now also works when the 8749 \code{*.vars} arguments are (integer or character vectors) of 8750 length zero. 8751 8752 \item Calling \code{cat()} on a malformed UTF-8 string could cause 8753 the Windows GUI to lock up. (\PR{15227}) 8754 8755 \item \code{removeClass(cc)} gave "node stack overflow" for some 8756 class definitions containing \code{"array"} or \code{"matrix"}. 8757 } 8758 } 8759} 8760 8761\section{CHANGES in previous versions}{ 8762 \itemize{ 8763 \item Older news can be found in text format in files 8764 \ifelse{html}{\href{../NEWS.0}{NEWS.0}, \href{../NEWS.1}{NEWS.1} 8765 and \href{../NEWS.2}{NEWS.2}}{\file{NEWS.0}, \file{NEWS.1} and 8766 \file{NEWS.2}} 8767 in the \file{doc} directory. News in HTML format for 8768 \R versions from 2.10.0 to 2.15.3 is in 8769 \ifelse{html}{\url{NEWS.2.html}}{\file{doc/html/NEWS.2.html}}. 8770 } 8771} 8772