What’s new in R?

What’s new in R?

The most recent version of R that was released earlier this year is R 3.5.0. This version includes lots of new features and significant improvements in terms of speed and performance. The major change announced that is visible to the users is that all the packages in R will be byte-compiled by default on installation. This will make the installed packages larger, and it may affect the message formats and tracebacks.

This article gives you a glimpse of some of the bug fixes, major features and other things in the version 3.5.0. Here are these mentioned below.

Bug fixes

  • file("stdin") will not be considered seekable anymore.
  • dput() and dump() are not truncating on setting of options(deparse.max.lines = *)
  • When printed, the calls with an S3 class are not evaluated, fixing part of PR#17398, credit goes to a patch from Lionel Henry.
  • Allow the file argument of Rscript to add a space even this argument is the first place in the command line.
  • callNextMethod() makes use of the the generic from the environment of the calling method. Credit goes to Hervé Pagès with well documented examples.
  • connections of the compressed file are marked as blocking.
  • optim(*, lower = c(-Inf, -Inf)) does not give any warning (and switches the method), credit goes to John Nash for his suggestion on this.
  • predict(fm, newdata) is now correct for models also where the formula has terms such as splines::ns(..) or stats::poly(..) fixing PR#17414, based on a patch from Duncan Murdoch.
  • simulate.lm(glm(*, gaussian(link = <non-default>))) is now rectified, fixing PR#17415 credit goes to Alex Courtiol.
  • unlist(x) will not fail anymore in some of the cases of nested empty lists. Reported by Steven Nydick.
  • qr.coef(qr(<all 0, w/ colnames>)) is working now. Reported by Kun Ren.
  • The radix sort is powerful to vectors with more than one billion elements (but long vectors are still unsupported). Credit goes to Matt Dowle for the resolution.
  • Terminal connections (e.g., stdin) will not be buffered anymore. Fixes PR#17432.

See more here.

Latest Features

  • order() method is used by factor() method for sorting its levels instead of sort.list(). This enables the factor() to support custom vector-like objects in case the methods for the suitable generics are defined. Its side effect is that it makes the factor() succeed on empty or length-one non-atomic vector(-like) types (e.g., "list"), where it failed earlier.
  • diag() function gets an optional names argument: this may need updates to packages defining S4 methods for it.
  • useHTTPS argument is no longer available for chooseCRANmirror() and chooseBioCmirror(), not required now all R builds support https:// downloads.
  • A new method with name summary() is introduced for warnings() with a (somewhat experimental) print() method.
  • methods package.) .self is now registered automatically as a global variable when registering a reference class method.
  • tempdir(check = TRUE) creates the tempdir() directory again, in case it is invalid (e.g. due to cleaning up of the ‘/tmp’ directory by some process).
  • New askYesNo() method and "askYesNo" option are introduced for asking binary response questions from the user in a customizable but consistent way. (Suggestion of PR#17242.)
  • ...elt(n) and ...length() are the new low level utilities introduced to work with parts inside a method.
  • The method isTRUE() is now more tolerant and true in

The new method isFALSE() is analogously defined to isTRUE() method.

See more here

Utilities

  • install.packages() for source packages now has the possibility of setting timeout’ (elapsed-time limit). This uses the timeout argument of system2() for serial installs, and needs the timeout utility command from GNU coreutils for parallel installs.
  • Now it is possible to set ‘timeouts’ (elapsed-time limits) for most parts of R CMD check through the environment variables documented in the ‘R Internals’ manual.
  • The repository named ‘BioC extra’ has been removed from setRepositories(). This repository was earlier dropped from Bioconductor 3.6. Now the mapping Now, the mapping for 6–8 used by setRepositories(ind=) is changed.

More new updates can be obtained here

INSTALLATION on a UNIX-ALIKE

  • The support has been removed for system Java on macOS, you need to install a recent Java (JDK) from the official website of oracle. For more details, see ‘R Installation and Administration’ §C.3.2.
  • Configure works harder In order to set additional flags in SAFE_FFLAGS only where it is required,and for using flags which have very less or no effect on performance.
  • It may be important in rare circumstances to override the setting of SAFE_FFLAGS.
  • C99 functions expm1, hypot, log1p and nearbyint are now needed.
  • configure sets a -std flag hor the C++ compiler for all supported C++ standards (e.g., -std=gnu++11 for the C++11 compiler). This was not done earlier, where the default standard was passed the tests made (e.g. clang 6.0.0 for C++11).

C-LEVEL FACILITIES

  • ‘Writing R Extensions’ documents macros MAYBE_REFERENCEDMAYBE_SHARED and MARK_NOT_MUTABLE that should be used by package C code instead NAMED or SET_NAMED.
  • The object header layout is now changed to help merging the ALTREP branch. This needs installing of packages again that use compiled code.
  • The R_tryCatchR_tryCatchError, and R_UnwindProtect methods are now documented by ‘Writing R Extensions’.
  • NAMEDMAX is raised to 3 for enabling protection of intermediate results from (usually ill-advised) assignments in arguments to BUILTIN methods. There may be a need to revise the package C code using SET_NAMED.

DEPRECATED AND DEFUNCT

  • Sys.timezone(location = FALSE) is defunct, and is ignored (with a warning).
  • methods:::bind_activation() is defunct now. Typically, it has not been required for years.
  • .__H__.cbind and .__H__.rbind in package base, which were the undocumented ‘hidden’ objects,  are deprecated (in favour of cbind and rbind).
  • The declaration of pythag() in ‘Rmath.h’ has been removed — the entry point has not been provided since R 2.14.0.

BUG FIXES

  • printCoefmat()now also works without column names.
  • When the structure is not an S4 object, an infinite recursion is no longer caused by the S4 methods on Ops() for the "structure" class no longer cause.
  • nlm(f, ..) now computes LL' = H + µI correctly for the case where f() has a "hessian" attribute. (PR#17249).
  • The argument is no longer dropped by the S4 method from its formats. The S4 method is a method that “rematches” to its generic and overrides the default value of a generic formal argument to NULL
  • More than one argument given on the #! line of a script can be accepted by Rscript. Earlier it was only limited to one argument that could be passed on the #! line in Linux.

Check out more details here.

What’s new in Machine Learning? (Prev Lesson)
(Next Lesson) What’s new in Android?
', { 'anonymize_ip': true });