Skip to content

Releases: r-hub/R

4.3.0

22 Apr 00:03

Choose a tag to compare

CHANGES IN R 4.3.0

SIGNIFICANT USER-VISIBLE CHANGES:

  • Calling && or || with LHS or (if evaluated) RHS of length greater
    than one is now always an error, with a report of the form

    'length = 4' in coercion to 'logical(1)'
    

    Environment variable _R_CHECK_LENGTH_1_LOGIC2_ no longer has any
    effect.

NEW FEATURES:

  • The included BLAS sources have been updated to those shipped with
    LAPACK version 3.10.1. (This caused some platform-dependent
    changes to package check output.) And then to the sources from
    LAPACK version 3.11.0 (with changes only to double complex
    subroutines).

  • The included LAPACK sources have been updated to include the four
    Fortran 90 routines rather than their Fortran 77 predecessors.
    This may give some different signs in SVDs or
    eigendecompositions.. (This completes the transition to LAPACK
    3.10.x begun in R 4.2.0.)

  • The LAPACK sources have been updated to version 3.11.0. (No new
    subroutines have been added, so this almost entirely bug fixes:
    Those fixes do affect some computations with NaNs, including R's
    NA.)

  • The parser now signals classed errors, notably in case of the
    pipe operator |>. The error object and message now give line and
    column numbers, mostly as proposed and provided by Duncan Murdoch
    in PR#18328.

  • toeplitz() is now generalized for asymmetric cases, with a
    toeplitz2() variant.

  • xy.coords() and xyz.coords() and consequently, e.g., plot(x,y, log = "y") now signal a classed warning about negative values
    of y (where log(.) is NA). Such a warning can be specifically
    suppressed or caught otherwise.

  • Regular expression functions now check more thoroughly whether
    their inputs are valid strings (in their encoding, e.g. in
    UTF-8).

  • The performance of grep(), sub(), gsub() and strsplit() has been
    improved, particularly with perl = TRUE and fixed = TRUE. Use of
    useBytes = TRUE for performance reasons should no longer be
    needed and is discouraged: it may lead to incorrect results.

  • apropos() gains an argument dot_internals which is used by the
    completion (help(rcompgen)) engine to also see base internals
    such as .POSIXct().

  • Support in tools::Rdiff() for comparing uncompressed PDF files is
    further reduced - see its help page.

  • qqplot(x, y, ...) gains conf.level and conf.args arguments for
    computing and plotting a confidence band for the treatment
    function transforming the distribution of x into the distribution
    of y (Switzer, 1976, Biometrika). Contributed by Torsten
    Hothorn.

  • Performance of package_dependencies() has been improved for cases
    when the number of dependencies is large.

  • Strings newly created by gsub(), sub() and strsplit(), when any
    of the inputs is marked as "bytes", are also marked as "bytes".
    This reduces the risk of creating invalid strings and accidental
    substitution of bytes deemed invalid.

  • Support for readLines(encoding = "bytes") has been added to allow
    processing special text files byte-by-byte, without creating
    invalid strings.

  • iconv(from = "") now takes into account any declared encoding of
    the input elements and uses it in preference to the native
    encoding. This reduces the risk of accidental creation of
    invalid strings, particularly when different elements of the
    input have different encoding (including "bytes").

  • Package repositories in getOption("repos") are now initialized
    from the repositories file when utils is loaded (if not already
    set, e.g., in .Rprofile). (From a report and patch proposal by
    Gabriel Becker in PR#18405.)

  • compactPDF() gets a verbose option.

  • type.convert() and hence read.table() get new option tryLogical = TRUE with back compatible default. When set to false, converts
    "F" or "T" columns to character.

  • Added new unit prefixes "R" and "Q" for abbreviating
    (unrealistically large) sizes beyond 10^{27} in standard = "SI",
    thanks to Henrik Bengtsson's PR#18435.

  • as.data.frame()'s default method now also works fine with atomic
    objects inheriting from classes such as "roman", "octmode" and
    "hexmode", such fulfilling the wish of PR#18421, by Benjamin
    Feakins.

  • The as.data.frame.vector() utility now errors for wrong-length
    row.names. It warned for almost six years, with “Will be an
    error!”.

  • sessionInfo() now also contains La_version() and reports codepage
    and timezone when relevant, in both print() and toLatex() methods
    which also get new option tzone for displaying timezone
    information when locale = FALSE.

  • New function R_compiled_by() reports the C and Fortran compilers
    used to build R, if known.

  • predict(<lm>, newdata = *) no longer unnecessarily creates an
    offset of all 0s.

  • solve() for complex inputs now uses argument tol and by default
    checks for ‘computational singularity’ (as it long has done for
    numeric inputs).

  • predict(<rank-deficient lm>, newdata=*) now obeys a new argument
    rankdeficient, with new default "warnif", warning only if there
    are non-estimable cases in newdata. Other options include
    rankdeficient = "NA", predicting NA for non-estimable newdata
    cases. This addresses PR#15072 by Russ Lenth and is based on his
    original proposal and discussions in PR#16158 also by David Firth
    and Elin Waring. Still somewhat experimental.

  • Rgui console implementation now works better with the NVDA screen
    reader when the full blinking cursor is selected. The underlying
    improvements in cursor handling may help also other screen
    readers on Windows.

  • The drop-field control in GraphApp can now be left with the TAB
    key and all controls can be navigated in the reverse order using
    the Shift+TAB key, improving accessibility of the Rgui
    configuration editor.

  • qnorm(<very large negative>, log.p=TRUE) is now fully accurate
    (instead of to “only” minimally five digits).

  • demo(error.catching) now also shows off withWarnings() and
    tryCatchWEMs().

  • As an experimental feature the placeholder _ can now also be used
    in the rhs of a forward pipe |> expression as the first argument
    in an extraction call, such as _$coef. More generally, it can be
    used as the head of a chain of extractions, such as _$coef[[2]].

  • Spaces in the environment variable used to choose the R session's
    temporary directory (TMPDIR, TMP and TEMP are tried in turn) are
    now fatal. (On Windows the ‘short path’ version of the path is
    tried and used if that does not contain a space.)

  • all.equal.numeric() gets a new optional switch giveErr to return
    the numeric error as attribute. Relatedly,
    stopifnot(all.equal<some>(a, b, ..)) is as “smart” now, as
    stopifnot(all.equal(....)) has been already, thus allowing
    customized all.equal<Some>() wrappers.

  • R on Windows is now able to work with path names longer than 260
    characters when these are enabled in the system (requires at
    least Windows 10 version 1607). Packages should be updated to
    work with long paths as well, instead of assuming PATH_MAX to be
    the maximum length. Custom front-ends and applications embedding
    R need to update their manifests if they wish to allow this
    feature. See
    https://blog.r-project.org/2023/03/07/path-length-limit-on-windows
    for more information.

  • ‘Object not found’ and ‘Missing argument’ errors now give a more
    accurate error context. Patch provided by Lionel Henry in
    PR#18241.

  • The @ operator is now an S3 generic. Based on contributions by
    Tomasz Kalinowski in PR#18482.

  • New generic chooseOpsMethod() provides a mechanism for objects to
    resolve cases where two suitable methods are found for an Ops
    Group Generic. This supports experimenting with alternative
    object systems. Based on contributions by Tomasz Kalinowski in
    PR#18484.

  • inherits(x, what) now accepts values other than a simple
    character vector for argument what. A new generic, nameOfClass(),
    is called to resolve the class name from what. This supports
    experimenting with alternative object systems. Based on
    contributions by Tomasz Kalinowski in PR#18485.

  • Detection of BLAS/LAPACK in use (sessionInfo()) with FlexiBLAS
    now reports the current backend.

  • The "data.frame" method for subset() now warns about extraneous
    arguments, typically catching the use of = instead of == in the
    subset expression.

  • Calling a:b when numeric a or b is longer than one may now be
    made into an error by setting environment variable
    _R_CHECK_LENGTH_COLON_ to a true value, along the proposal in
    PR#18419 by Henrik Bengtsson.

  • density(x, weights = *) now warns if automatic bandwidth
    selection happens without using weights; new optional warnWbw may
    suppress the warning. Prompted by Christoph Dalitz' PR#18490 and
    its discussants.

  • rm(list = *) is faster and more readable thanks to Kevin Ushey's
    PR#18492.

  • The plot.lm() function no longer produces a normal Q-Q plot for
    GLMs. Instead it plots a half-normal Q-Q plot of the absolute
    valu...

Read more

R 4.2.3

19 Mar 11:40

Choose a tag to compare

CHANGES in R 4.2.3

C-LEVEL FACILITIES:

  • The definition of DL_FUNC in R_ext/Rdynload.h has been changed to
    be fully C-compliant. This means that functions loaded via for
    example R_GetCCallable need to be cast to an appropriate type if
    they have any arguments.

  • .Machine has a new element sizeof.time_t to identify old systems
    with a 32-bit type and hence a limited range of date-times (and
    limited support for dates millions of years from present).

PACKAGE INSTALLATION:

  • (Windows) The default C++ standard had accidentally been left at
    C++11 when it was changed to C++14 on Unix.

BUG FIXES:

  • As "POSIXlt" objects may be “partially filled” and their list
    components meant to be recycled, length() now is the length of
    the longest component.

  • as.POSIXlt.Date() could underflow for dates in the far past (more
    than half a million years BCE).

  • as.Date.POSIXlt(x) would return "1970-01-01" instead of NA in R
    4.2.2, e.g., for

        x <- as.POSIXlt(c("2019-01-30","2001-1-1"))
        x$mon <- c(0L, NA); as.Date(x)
    
  • R CMD check failed to apply enabled _R_CHECK_SUGGESTS_ONLY_ to
    examples and vignettes (regression in R 4.2.0).

  • R CMD check did not re-build vignettes in separate processes by
    default (regression in R 4.2.0).

  • Running examples from HTML documentation now restores previous
    knitr settings and options (PR#18420).

  • Quartz: fonts are now located using Core Graphics API instead of
    deprecated ATS which is no longer supported in the macOS 13 SDK
    (PR#18426). This also addresses an issue where the currently
    used font in the Quartz device context was not correctly
    retained.

  • (Windows) Math symbols in text drawing functions are again
    rendered correctly (PR#18440). This fixes a regression in R
    4.2.1 caused by a fix in PR#18382 which uncovered an issue in
    GraphApp due to which the symbol charset was not used with TT
    Symbol font face.

  • (Windows) Installing a package with a src/Makefile.{win,ucrt}
    file includes ~/.R/Makevars.win64 in the search for user
    makevars, as documented in “R Installation and Administration”
    and done for packages with a src/Makevars.{win,ucrt} file.

  • format(<POSIXlt_w/_unbalanced_sec>, "....%OS<n>") with n > 0 no
    longer accidentally uses the unbalanced seconds, thanks to
    Suharto Anggono's report (including patch) in PR#18448.

  • solve.default(a, b) works around issues with some versions of
    LAPACK when a contains NA or NaN values.

  • When UseMethod() cannot dispatch, it no longer segfaults
    producing the error message in case of a long class(), thanks to
    Joris Vankerschaver's report (including patch) in PR#18447.

  • When example(foo, ..) produces graphics on an interactive device
    it needs to open itself, it now leaves devAskNewPage() unchanged
    even when it was FALSE, thus fixing a 14 years old ‘’.

  • packageDescription() again catches errors from encoding
    conversions. This also fixes broken packageVersion() in C locale
    on systems where iconv does not support transliteration.

4.2.2

10 Jan 20:49

Choose a tag to compare

CHANGES IN R 4.2.2

NEW FEATURES:

  • tools::Rdiff(useDiff = TRUE) checks for the presence of an
    external diff command and switches to useDiff = FALSE if none is
    found. This allows R CMD Rdiff to always work.

  • On Windows, environment variable R_LIBCURL_SSL_REVOKE_BEST_EFFORT
    can be used to switch to only ‘best-effort’ SSL certificate
    revocation checks with the default "libcurl" download method.
    This reduces security, but may be needed for downloads to work
    with MITM proxies (PR#18379).

  • (macOS) The run-time check for libraries from XQuartz for X11 and
    Tcl/Tk no longer uses otool from the Apple Developer Tools
    (PR#18400).

  • The LaTeX style for producing the PDF manuals, Rd.sty, now loads
    the standard amsmath, amsfonts and amssymb packages for greater
    coverage of math commands in the Rd \eqn and \deqn macros. The
    \mathscr LaTeX command is also provided (via the mathrsfs
    package, if available, or the amsfonts bundle otherwise),
    fulfilling the wish of PR#18398.

  • (Windows) The default format of readClipboard() and
    writeClipboard() has been changed to 13 (CF_UNICODETEXT).

INSTALLATION on a UNIX-ALIKE:

  • The PDF manuals (if built) can be compacted by the new target
    make compact-pdf (at the top level or in directory doc/manual).

  • There is now configure support for LLVM clang 15 on Linux, which
    defaults to position-independent (PIE) executables whereas
    gfortran does not.

  • Many small changes to ease compilation (and suppress warnings)
    with LLVM clang 15.

BUG FIXES:

  • Rscript -e would fail if stdin were closed (Reported by Henrik
    Bengtsson.)

  • qt(*, log.p=TRUE) in outer tails no longer produces NaN in its
    final steps, thus fixing PR#18360.

  • tools::Rd2latex() now escapes hashes and ampersands when writing
    URLs, fixing LaTeX errors with such URLs in \tabular.

  • When isGeneric(f, fdef=*) is used with mismatching names, the
    warning is better understandable; reported (with fix) in PR#18370
    by Gabe Becker.

  • poly(x, n) now works again (and is now documented) when x is a
    "Date" or "POSIXct" object, or of another class while fulfilling
    mode(x) == "numeric". This also enables poly(x, *, raw=TRUE) for
    such variables. Reported by Michael Chirico to R-devel.

  • write.table(), write.csv() and write.csv2() restore their
    numerical precision (internal equivalent of digits = 15) after an
    interrupt (PR#18384).

  • One can now read also byte FF from a clipboard connection
    (PR#18385).

  • source("") and source(character()) now give more helpful error
    messages.

  • R CMD check --as-cran set _R_CHECK_TIMINGS_ too late to have the
    intended effect.

  • as.POSIXlt(x) now also works with very large dates x, fixing
    PR#18401 reported by Hannes Mühleisen.

  • Files can now be extracted even from very large zip archives
    (PR#18390, thanks to Martin Jakt).

  • Non-finite objects of class "POSIXlt" are now correctly coerced
    to classes "Date" and "POSIXct"; following up on the extension to
    format() them correctly.

  • Added methods for is.finite(), is.infinite() and is.nan() for
    "POSIXlt" date-time objects.

BUG FIXES on Windows:

  • Non-ASCII characters are now properly displayed on Windows in
    windows created using GraphApp via e.g. winDialogString thanks to
    a workaround for an at least surprising Windows behavior with
    UTF-8 as the system encoding (PR#18382).

  • Find and replace operations work again in the script editor in
    Rgui on Windows.

  • Computation of window size based on requested client size in
    GraphApp when running in a multi-byte locale on Windows has been
    fixed (regression in R 4.2.0 for users of systems where R 4.1
    used a single-byte locale). Rgui again respects the number of
    console rows and columns given in Rconsole file.

  • Rterm support for Alt+xxx sequences has been fixed to produce the
    corresponding character (only) once. This fixes pasting text with
    tilde on Italian keyboard (PR#18391).

R 4.2.1

04 Jul 17:37

Choose a tag to compare

CHANGES IN R 4.2.1

NEW FEATURES:

  • New function utils::findCRANmirror() to find out if a CRAN mirror
    has been selected, otherwise fallback to the main site. This
    behaves in the same way as tools::CRAN_package_db() and is
    intended for packages wishing to access CRAN for purposes other
    than installing packages.

    The need for this was shown by a day when the main CRAN website
    was offline and a dozen or so packages which had its URL
    hardcoded failed their checks.

INSTALLATION on a UNIX-ALIKE:

  • The libraries searched for by --with-blas (without a value) now
    include BLIS (after OpenBLAS but before ATLAS). And on macOS,
    the Accelerate framework (after ATLAS). (This is patterned after
    the AX_BLAS macro from the Autoconf Archive.)

  • The included LAPACK sources have been updated to 3.10.1.

UTILITIES:

  • The (full path to) the command tidy to be used for HTML
    validation can be set by environment variable R_TIDYCMD.

  • Setting environment variable _R_CHECK_RD_VALIDATE_RD2HTML_ to a
    false value will override R CMD check --as-cran and turn off HTML
    validation. This provides a way to circumvent a problematic
    tidy.

    The 2006 version that ships with macOS is always skipped.

C-LEVEL FACILITIES:

  • The undocumented legacy declarations of Sint, Sfloat, SINT_MAX
    and SINT_MIN in header R.h are deprecated.

BUG FIXES:

  • fisher.test(d) no longer segfaults for "large" d; fixing PR#18336
    by preventing/detecting an integer overflow reliably.

  • tar(., files=*) now produces correctly the warning about invalid
    uid or gid of files, fixing PR#18344, reported by Martin Morgan.

  • tk_choose.files() with multi = FALSE misbehaved on paths
    containing spaces (PR#18334) (regression introduced in R 4.0.0).

  • sort(x, partial = ind, *) now works correctly notably for the
    non-default na.last = FALSE or TRUE, fixing PR#18335 reported by
    James Edwards.

  • Environment variable _R_CHECK_XREFS_REPOSITORIES_ is only used
    for checking .Rd cross-references in R CMD check (as documented)
    and not for other uses looking for a CRAN mirror.

  • The search for a CRAN mirror when checking packages now uses
    getOption("repos") if that specifies a CRAN mirror, even when it
    does not also specify all three Bioconductor repositories (as was
    previously required).

  • The HTML code generated by tools::Rd2HTML() has been improved to
    pass tidy 5.8.0.

BUG FIXES on Windows:

  • Writing to a clipboard connection works again, fixing a
    regression in R 4.2.0 (PR#18332). Re-using a closed clipboard
    connection longer issues a spurious warning about an ignored
    encoding argument.

  • C function getlocale no longer attempts to query an unsupported
    category from the OS, even when requested at R level, which may
    cause crashes when R 4.2.0 (which uses UCRT) is embedded
    (reported by Kevin Ushey).

  • Accent keys now work in GraphApp Unicode windows, which are used
    by Rgui whenever running in a multibyte locale (so also in UTF-8,
    hence fixing a regression in R 4.2.0 for users of systems where R
    4.1 used a single-byte locale).

  • Completion in Rgui now works also with non-ASCII characters.

  • Rgui no longer truncates usage information with --help.

  • Text injection from external applications via SendInput now works
    in GraphApp Unicode windows, fixing a regression in R 4.2.0 for
    Rgui users of systems where R 4.1 used a single-byte locale but R
    4.2.0 uses UTF-8.

  • Performance of txtProgressBar() in Rgui when running in a
    multi-byte locale has been improved (fixing a performance
    regression in R 4.2.0 for users of systems where R 4.1 used a
    single-byte locale).

  • The script editor in Rgui now works also on systems using UTF-8
    as the native encoding. Users of the script editor have to
    convert their scripts with non-ASCII characters to UTF-8 before
    reading them in R 4.2.1 or newer (on recent Windows where UTF-8
    is used). This fixes a regression in R 4.2.0, which prevented
    some operations with scripts when they contained non-ASCII
    characters.

devel

22 Mar 14:59

Choose a tag to compare

tweaks

git-svn-id: https://svn.r-project.org/R/trunk@82327 00db46b3-68df-0310-9c12-caf00c1e9a41

next

04 Apr 08:51

Choose a tag to compare

Ported c82322 from trunk.

git-svn-id: https://svn.r-project.org/R/branches/R-4-2-branch@82323 00db46b3-68df-0310-9c12-caf00c1e9a41

4.2.0

09 May 06:48

Choose a tag to compare

CHANGES IN R 4.2.0

SIGNIFICANT USER-VISIBLE CHANGES:

  • The formula method of aggregate() now matches the generic in
    naming its first argument x (resolving PR#18299 by Thomas
    Soeiro).

    This means that calling aggregate() with a formula as a named
    first argument requires name formula in earlier versions of R and
    name x now, so portable code should not name the argument (code
    in many packages did).

  • Calling && or || with either argument of length greater than one
    now gives a warning (which it is intended will become an error).

  • Calling if() or while() with a condition of length greater than
    one gives an error rather than a warning. Consequently,
    environment variable _R_CHECK_LENGTH_1_CONDITION_ no longer has
    any effect.

  • Windows users should consult the WINDOWS section below for some
    profound changes including

    • Support for 32-bit builds has been dropped.

    • UTF-8 locales are used where available.

    • The default locations for the R installation and personal
      library folder have been changed.

    Thanks to Tomas Kalibera for months of work on the Windows port
    for this release.

NEW FEATURES:

  • matrix(x, n, m) now warns in more cases where length(x) differs
    from n * m, as suggested by Abby Spurdle and Wolfgang Huber in
    Feb 2021 on the R-devel mailing list.

    This warning can be turned into an error by setting environment
    variable _R_CHECK_MATRIX_DATA_ to TRUE: R CMD check --as-cran
    does so unless it is already set.

  • Function file_test() in package utils gains tests for symlinks,
    readability and writability.

  • capabilities("libxml") is now false.

    The description of capabilities("http/ftp") now reflects that it
    refers to the default method, no longer the internal one.

  • simplify2array() gains an except argument for controlling the
    exceptions used by sapply().

  • Environment variables R_LIBS_USER and R_LIBS_SITE are both now
    set to the R system default if unset or empty, and can be set to
    NULL to indicate an empty list of user or site library
    directories.

  • The warning for axis()(-like) calls in cases of relatively small
    ranges (typically in log-scale situations) is slightly improved
    and suppressed from explicit calls to .axisPars() as has always
    been the intention.

  • The contrasts setter function contrasts<- gains an explicit
    default how.many = NULL rather than just using missing(how.many).

  • grid.pretty() gains a new optional argument n = 5.

  • There is a new function .pretty() with option bounds as a
    technical-utility version of pretty(). It and pretty() gain a
    new argument f.min with a better than back-compatible default.

  • Function grDevices::axisTicks() and related functions such as
    graphics::axis() work better, notably for the log scale; partly
    because of the pretty() improvements, but also because care is
    taken e.g., when ylim is finite but diff(ylim) is infinite.

  • nclass.FD() gains a digits option.

  • The R Mathlib internal C function bd0() (called indirectly from a
    dozen probability density and distribution functions such as
    dpois(), dbinom(), dgamma(), pgamma() etc) has been
    complemented by a more sophisticated and (mostly) more accurate C
    function ebd0(), currently called only by internal dpois_raw()
    improving accuracy for R level dpois() and potentially others
    calling it such as dnbinom(), dgamma() or pgamma(). (Thanks to
    Morten Welinder's PR#15628.)

  • write.ftable() gains sep = " " argument as suggested by Thomas
    Soeiro.

  • The names of the locale categories supported by R's
    Sys.getlocale() and Sys.setlocale() are now provided by variable
    .LC.categories in the base namespace.

  • The Date and POSIXt methods for hist() and the histogram method
    for plot() now also use the new default col = "lightgray" in
    consistency with the corresponding change to hist()'s default for
    R 4.0.0.

  • hist.default() gains new fuzz argument, and the histogram plot
    method no longer uses fractional axis ticks when displaying
    counts ("Frequency").

  • mapply() and hence Map() now also obey the "max-or-0-if-any"
    recycling rule, such that, e.g., Map(+, 1:3, 1[0]) is valid
    now.

  • as.character(<obj>) for "hexmode" or "octmode" objects now
    fulfils the important basic rule as.character(x)[j] === as.character(x[j]).

  • The set utility functions, notably intersect() have been tweaked
    to be more consistent and symmetric in their two set arguments,
    also preserving a common mode.

  • substr(ch, start,end) <- new now e.g., preserves names(ch); ditto
    for substring(), thanks to a patch from Brodie Gaslam.

  • plot(<lm>) gains a extend.ylim.f argument, in partial response to
    PR#15285; further PR#17784 is fixed thanks to several
    contributors and a patch by Elin Waring. The Cook's dist
    contours get customizable via cook.col and cook.lty with a
    different default color and their legend is nicer by default and
    customizable via cook.legendChanges.

  • Attempting to subset an object that is not subsettable now
    signals an error of class notSubsettableError. The
    non-subsettable object is contained in the object field of the
    error condition.

  • Subscript-out-of-bounds errors are now signaled as errors of
    class subscriptOutOfBoundsError.

  • Stack-overflow errors are now signaled as errors inheriting from
    class stackOverflowError. See ?stackOverflowError for more
    details.

  • New partly experimental Sys.setLanguage() utility, solving the
    main problem of PR#18055.

  • gettext() and gettextf() get a new option trim = TRUE which when
    set to false allows translations for strings such as "Execution halted\n" typical for C code.

  • An experimental implementation of hash tables is now available.
    See ?hashtab for more details.

  • identical() gains a extptr.as.ref argument for requesting that
    external pointer objects be compared as reference objects.

  • reorder() gets an argument decreasing which it passes to sort()
    for level creation; based on the wish and patch by Thomas Soeiro
    in PR#18243.

  • as.vector() gains a data.frame method which returns a simple
    named list, also clearing a long standing 'FIXME' to enable
    as.vector(<data.frame>, mode="list"). This breaks code relying
    on as.vector(<data.frame>) to return the unchanged data frame.

  • legend() is now vectorized for arguments cex, x.intersp, and
    text.width. The latter can now also be specified as a vector
    (one element for each column of the legend) or as NA for
    computing a proper column wise maximum value of strwidth(legend).
    The argument y.intersp can be specified as a vector with one
    entry for each row of the legend.

    legend() also gains new arguments title.cex and title.font.
    Thanks to Swetlana Herbrandt.

  • Deparsing no longer remaps attribute names dim, dimnames, levels,
    names and tsp to historical S-compatible names (which structure()
    maps back).

  • sample() and sample.int() have additional sanity checks on their
    size and n arguments.

    all.equal.numeric() gains a sanity check on its tolerance
    argument - calling all.equal(a, b, c) for three numeric vectors
    is a surprisingly common error.

    mean(na.rm =), rank(na.last =), barplot(legend.text =),
    boxplot(), contour(drawlabels =), polygon(border =) and
    methods::is(class2 =) have more robust sanity checks on their
    arguments.

    R CMD Rd2pdf (used by R CMD check) has a more robust sanity check
    on the format of \alias{} commands.

  • psigamma(x, deriv) for negative x now also works for deriv = 4
    and 5; their underlying C level dpsifn() is documented in
    'Writing R Extensions'.

  • The HTML help system now uses HTML5 (wish of PR#18149).

  • ks.test() now provides exact p-values also with ties and MC
    p-values in the two-sample (Smirnov) case. By Torsten Hothorn.

  • ks.test() gains a formula interface, with y ~ 1 for the
    one-sample (Kolmogorov) test and y ~ group for the two-sample
    (Smirnov) test. Contributed by Torsten Hothorn.

  • The return value from ks.test() now has class c("ks.test", "htest") - packages using try() need to take care to use
    inherits() and not == on the class.

  • New functions psmirnov(), qsmirnov() and rsmirnov() in package
    stats implementing the asymptotic and exact distributions of the
    two-sample Smirnov statistic.

  • iconv() now allows sub = "c99" to use C99-style escapes for UTF-8
    inputs which cannot be converted to encoding to.

  • In a forward pipe |> expression it is now possible to use a named
    argument with the placeholder _ in the rhs call to specify where
    the lhs is to be inserted. The placeholder can only appear once
    on the rhs.

  • The included LAPACK sources have been updated to version 3.10.0,
    except for the four Fortran 77 routines which 3.10.0 has
    re-implemented in Fortran 90 (where the older versions have been
    retained as the R build process does not support Fortran 90).

  • path.expand() and most other uses of tilde expansion now warn if
    a path would be too long if expanded. (An exception is
    file.exists(), which silently returns false.)

  • trunc(<Date>, *) no...

Read more

4.1.3

20 Mar 20:15

Choose a tag to compare

CHANGES IN R 4.1.3 # NEW FEATURES:
  • The default version of Bioconductor has been changed to 3.14.
    (This is used by setRepositories and the menus in GUIs.)

UTILITIES:

  • R CMD check --as-cran has a workaround for a bug in versions of
    file up to at least 5.41 which mis-identify DBF files last
    changed in 2022 as executables.

C-LEVEL FACILITIES:

  • The legacy S-compatibility macros SINGLE_* in R_ext/Constants.h
    (included by R.h) are deprecated and will be removed in R 4.2.0.

BUG FIXES:

  • Initialization of self-starting nls() models with initialization
    functions following the pre-R-4.1.0 API (without the ...
    argument) works again for now, with a deprecation warning.

  • Fixed quoting of ~autodetect~ in Java setting defaults to avoid
    inadvertent user lookup due to leading ~, reported in PR#18231 by
    Harold Gutch.

  • substr(., start, stop) <- v now treats negative stop values
    correctly. Reported with a patch in PR#18228 by Brodie Gaslam.

  • Subscripting an array x without dimnames by a
    length(dim(x))-column character matrix gave "random" non-sense,
    now an error; reported in PR#18244 by Mikael Jagan.

  • ...names() now matches names(list(...)) closely, fixing PR#18247.

  • all.equal(*, scale = s) now works as intended when length(s) > 1,
    partly thanks to Michael Chirico's PR#18272.

  • print(x) for long vectors x now also works for named atomic
    vectors or lists and prints the correct number when reaching the
    getOption("max.print") limit; partly thanks to a report and
    proposal by Hugh Parsonage to the R-devel list.

  • all.equal(<selfStart>, *) no longer signals a deprecation
    warning.

  • reformulate(*, response=r) gives a helpful error message now when
    length(r) > 1, thanks to Bill Dunlap's PR#18281.

  • Modifying globalCallingHandlers inside withCallingHandlers() now
    works or fails correctly, thanks to Henrik Bengtsson's PR#18257.

  • hist(<Date>, breaks = "days") and hist(<POSIXt>, breaks = "secs")
    no longer fail for inputs of length 1.

  • qbeta(.001, .9, .009) and similar cases now converge correctly
    thanks to Ben Bolker's report in PR#17746.

  • window(x, start, end) no longer wrongly signals "'start' cannot
    be after 'end'", fixing PR#17527 and PR#18291.

  • data() now checks that its (rarely used) list argument is a
    character vector - a couple of packages passed other types and
    gave incorrect results.

  • which() now checks its arr.ind argument is TRUE rather coercing
    to logical and taking the first element - which gave incorrect
    results in package code.

  • model.weights() and model.offset() more carefully extract their
    model components, thanks to Ben Bolker and Tim Taylor's R-devel
    post.

  • list.files(recursive = TRUE) now shows all broken symlinks
    (previously, some of them may have been omitted, PR#18296).

R 4.1.2

20 Mar 20:58

Choose a tag to compare

CHANGES IN R 4.1.2 # C-LEVEL FACILITIES:
  • The workaround in headers R.h and Rmath.h (using namespace std;)
    for the Oracle Developer Studio compiler is no longer needed now
    C++11 is required so has been removed. A couple more usages of
    log() (which should have been std::log()) with an int argument
    are reported on Solaris.

  • The undocumented limit of 4095 bytes on messages from the
    S-compatibility macros PROBLEM and MESSAGE is now documented and
    longer messages will be silently truncated rather than
    potentially causing segfaults.

  • If the R_NO_SEGV_HANDLER environment variable is non-empty, the
    signal handler for SEGV/ILL/BUS signals (which offers recovery
    user interface) is not set. This allows more reliable debugging
    of crashes that involve the console.

DEPRECATED AND DEFUNCT:

  • The legacy S-compatibility macros PROBLEM, MESSAGE, ERROR, WARN,
    WARNING, RECOVER, ... are deprecated and will be hidden in R
    4.2.0. R's native interface of Rf_error and Rf_warning has long
    been preferred.

BUG FIXES:

  • .mapply(F, dots, .) no longer segfaults when dots is not a list
    and uses match.fun(F) as always documented; reported by Andrew
    Simmons in PR#18164.

  • hist(<Date>, ...) and hist(<POSIXt>, ...) no longer pass
    arguments for rect() (such as col and density) to axis().
    (Thanks to Sebastian Meyer's PR#18171.)

  • \Sexpr{ch} now preserves Encoding(ch). (Thanks to report and
    patch by Jeroen Ooms in PR#18152.)

  • Setting the RNG to "Marsaglia-Multicarry" e.g., by RNGkind(), now
    warns in more places, thanks to Andr'e Gillibert's report and
    patch in PR#18168.

  • gray(numeric(), alpha=1/2) no longer segfaults, fixing PR#18183,
    reported by Till Krenz.

  • Fixed dnbinom(x, size=<very_small>, .., log=TRUE) regression,
    reported by Martin Morgan.

  • as.Date.POSIXlt(x) now keeps names(x), thanks to Davis Vaughan's
    report and patch in PR#18188.

  • model.response() now strips an "AsIs" class typically, thanks to
    Duncan Murdoch's report and other discussants in PR#18190.

  • try() is considerably faster in case of an error and long call,
    as e.g., from some do.call(). Thanks to Alexander Kaever's
    suggestion posted to R-devel.

  • qqline(y = <object>) such as y=I(.), now works, see also
    PR#18190.

  • Non-integer mgp par() settings are now handled correctly in
    axis() and mtext(), thanks to Mikael Jagan and Duncan Murdoch's
    report and suggestion in PR#18194.

  • formatC(x) returns length zero character() now, rather than ""
    when x is of length zero, as documented, thanks to Davis
    Vaughan's post to R-devel.

  • removeSource(fn) now retains (other) attributes(fn).

R 4.1.1

20 Mar 22:52

Choose a tag to compare

CHANGES IN R 4.1.1

NEW FEATURES:

  • require(pkg, quietly = TRUE) is quieter and in particular does
    not warn if the package is not found.

DEPRECATED AND DEFUNCT:

  • Use of ftp:// URIs should be regarded as deprecated, with
    on-going support confined to method = "libcurl" and not routinely
    tested. (Nowadays no major browser supports them.)

  • The non-default method = "internal" is deprecated for http:// and
    ftp:// URIs for both download.file and url.

  • On Windows, method = "wininet" is deprecated for http://,
    https:// and ftp:// URIs for both download.file and url. (A
    warning is only given for ftp://.)

    For ftp:// URIs the default method is now "libcurl" if available
    (which it is on CRAN builds).

    method = "wininet" remains the default for http:// and https://
    URIs but if libcurl is available, using method = "libcurl" is
    preferred.

INSTALLATION:

  • make check now works also without a LaTeX installation. (Thanks
    to Sebastian Meyer's PR#18103.)

BUG FIXES:

  • make check-devel works again in an R build configured with
    --without-recommended-packages.

  • qnbinom(p, size, mu) for large size/mu is correct now in a range
    of cases (PR#18095); similarly for the (size, prob)
    parametrization of the negative binomial. Also qpois() and
    qbinom() are better and or faster for extreme cases. The
    underlying C code has been modularized and is common to all four
    cases of discrete distributions.

  • gap.axis is now part of the axis() arguments which are passed
    from bxp(), and hence boxplot(). (Thanks to Martin Smith's
    report and suggestions in PR#18109.)

  • .First and .Last can again be set from the site profile.

  • seq.int(from, to, *) and seq.default(..) now work better in large
    range cases where from-to is infinite where the two boundaries
    are finite.

  • all.equal(x,y) now returns TRUE correctly also when several
    entries of abs(x) and abs(y) are close to .Machine$double.xmax,
    the largest finite numeric.

  • model.frame() now clears the object bit when removing the class
    attribute of a value via na.action (PR#18100).

  • charClass() now works with multi-character strings on Windows
    (PR#18104, fixed by Bill Dunlap).

  • encodeString() on Solaris now works again in Latin-1 encoding on
    characters represented differently in UTF-8. Support for
    surrogate pairs on Solaris has been improved.

  • file.show() on Windows now works with non-ASCII path names
    representable in the current native encoding (PR#18132).

  • Embedded R on Windows can now find R home directory via the
    registry even when installed only for the current user
    (PR#18135).

  • pretty(x) with finite x now returns finite values also in the
    case where the extreme x values are close in size to the maximal
    representable number .Machine$double.xmax.

    Also, it's been tweaked for very small ranges and when a boundary
    is close (or equal) to zero; e.g., pretty(c(0,1e-317)) no longer
    has negative numbers, currently still warning about a very small
    range, and pretty(2^-(1024 - 2^-1/(c(24,10)))) is more accurate.

  • The error message for not finding vignette files when weaving has
    correct file sizes now. (Thanks to Sebastian Meyer's PR#18154.)

  • dnbinom(20, <large>, 1) now correctly gives 0, and similar cases
    are more accurate with underflow precaution. (Reported by
    Francisco Vera Alcivar in PR#18072.)