This blog is updated daily.
A general description is here.
R now uses reference counting instead of the ‘NAMED’ mechanism for
determining when objects can be safely mutated in base C code. This
reduces the need for copying in some cases and should allow further
optimizations in the future. It should also help make the internal
code easier to maintain. This change is expected to have minimal
impact on packages not using unsupported coding practices in their
C/C++ code.
R is now built against a PCRE2 library for Perl-like regular
expressions. (On non-Windows platforms PCRE1 can optionally be used if
PCRE2 is not available at build time.) The version of PCRE in use can
be obtained via ‘extSoftVersion()’: PCRE1 has versions < 10, PCRE2
versions >= 10.
PCRE2 reports errors for some regular expressions that were accepted by PCRE1. A hyphen now has to be escaped in a character class to be interpreted as a literal (unless first or last in the class definition). ‘\R’, ‘\B’ and ‘\X’ are no longer allowed in character classes (PCRE1 treated these as literals).
Option ‘PCRE_study’ is no longer used with PCRE2, and is reported as ‘FALSE’ when that is in use.
Making PCRE2 available when building R from source is strongly recommended (preferably version 10.30 or later) as PCRE1 is no longer developed (it only receives bug fixes and has outdated Unicode tables)
R now uses reference counting instead of the ‘NAMED’ mechanism for determining when objects can be safely mutated in base C code. This reduces the need for copying in some cases and should allow further optimizations in the future. It should also help make the internal code easier to maintain.
This change is expected to have almost no impact on packages using supported coding practices in their C/C++ code.
R is built against a PCRE2 library for Perl-like regular expressions, if available. (On non-Windows platforms PCRE1 can optionally be used if PCRE2 is not available at build time.) The version of PCRE in use can be obtained via ‘extSoftVersion()’: PCRE1 has versions < 10, PCRE2 versions >= 10.
Making PCRE2 available when building R from source is strongly recommended (preferably version 10.30 or later) as PCRE1 is no longer developed (it only receives bug fixes and has outdated Unicode tables)
PCRE2 reports errors for some regular expressions that were accepted by PCRE1. A hyphen now has to be escaped in a character class to be interpreted as a literal (unless first or last in the class definition). ‘\R’, ‘\B’ and ‘\X’ are no longer allowed in character classes (PCRE1 treated these as literals).
Option ‘PCRE_study’ is no longer used with PCRE2, and is reported as ‘FALSE’ when that is in use.
‘N <- NULL; N[[1]] <- val’ now turns ‘N’ into a ‘list’ also when
‘length(val) == 1’, for consistency. This enables ‘dimnames(r1)[[1]]
<- "R1"’ for a 1-row matrix ‘r1’, fixing PR#17719, reported by Serguei
Sokol.
‘deparse(..)’, ‘dump(..)’, and ‘dput(x, control="all")’ now include
using control option ‘"digits17"’ which typically ensures 1:1
invertibility. New option ‘control = "exact"’ ensures numeric exact
invertibility via ‘"hexDigits"’.
When loading data sets via ‘read.table()’, ‘data()’ now uses
‘LC_COLLATE=C’ to ensure locale independent results for possible
string-to-factor conversions.
‘matrix’ objects now also inherit from class ‘"array"’, so e.g., ‘class(diag(1))’ is ‘c("matrix", "array")’. This invalidates code incorrectly assuming that ‘length(class(obj)) == 1’.
S3 methods for class ‘"array"’ are now dispatched for ‘matrix’ objects.
R now uses a ‘stringsAsFactors = FALSE’ default, and hence by default no longer converts strings to factors in calls to ‘data.frame()’ and ‘read.table()’.
A large number of packages relied on the previous behaviour and so have needed/wlll need updating.
The ‘plot()’ S3 generic function is now in package ‘base’ rather than package ‘graphics’, as it is reasonable to have methods that do not use the ‘graphics’ package. The generic is currently re-exported from the ‘graphics’ namespace to allow packages importing it from there to continue working, but this may change in future.
Packages which define S4 generics for ‘plot()’ should be re-installed and package code using such generics from other packages needs to ensure that they are imported rather than rely on their being looked for on the search path (as in a namespace, the base namespace has priority over the search path).
‘news()’ has been enhanced to cover the news on R 3.x and 2.x.
‘N <- NULL; N[[1]] <- val’ now turns ‘N’ into a ‘list’ also when ‘length(val) == 1’, for consistency. This enables ‘dimnames(r1)[[1]] <- "R1"’ for a 1-row matrix ‘r1’, fixing PR#17719, reported by Serguei Sokol.
‘deparse(..)’, ‘dump(..)’, and ‘dput(x, control="all")’ now include using control option ‘"digits17"’ which typically ensures 1:1 invertibility. New option ‘control = "exact"’ ensures numeric exact invertibility via ‘"hexDigits"’.
When loading data sets via ‘read.table()’, ‘data()’ now uses ‘LC_COLLATE=C’ to ensure locale independent results for possible string-to-factor conversions.