R 3.2.1 (codename “World-Famous Astronaut”) was released yesterday. You can get the latest binaries version from here. (or the .tar.gz source code from here). The full list of new features and bug fixes is provided below.
Upgrading to R 3.2.1 on Windows
If you are using Windows you can easily upgrade to the latest version of R using the installr package. Simply run the following code in Rgui:
install.packages("installr") # install
installr::updateR() # updating R.
Running “updateR()” will detect if there is a new R version available, and if so it will download+install it (etc.). There is also a step by step tutorial (with screenshots) on how to upgrade R on Windows, using the installr package.
I try to keep the installr package updated and useful, so if you have any suggestions or remarks on the package – you are invited to open an issue in the github page.
CHANGES IN R 3.2.1:
NEW FEATURES
utf8ToInt()
now checks that its input is valid UTF-8 and returnsNA
if it is not.install.packages()
now allowstype = "both"
withrepos = NULL
if it can infer the type of file.nchar(x, *)
andnzchar(x)
gain a new argumentkeepNA
which governs how the result forNA
s inx
is determined. For the R 3.2.x series, the default remainsFALSE
which is fully back compatible. From R 3.3.0, the default will change tokeepNA = NA
and you are advised to consider this for code portability.news()
more flexibly extracts dates from package ‘NEWS.Rd’ files.lengths(x)
now also works (trivially) for atomicx
and hence can be used more generally as an efficient replacement ofsapply(x, length)
and similar.- The included version of PCRE has been updated to 8.37, a bug-fix release.
diag()
no longer duplicates a matrix when extracting its diagonal.as.character.srcref()
gains an argument to allow characters corresponding to a range of source references to be extracted.
BUG FIXES
acf()
andccf()
now guarantee values strictly in [-1,1] (instead of sometimes very slightly outside). PR#15832.as.integer("111111111111")
now gives NA (with a warning) as it does for the corresponding numeric or negative number coercions. Further,as.integer(M + 0.1)
now givesM
(instead of NA) when M is the maximal representable integer.- On some platforms
nchar(x, "c")
andnchar(x, "w")
would return values (possiblyNA
) for inputs which were declared to be UTF-8 but were not, or for invalid strings without a marked encoding in a multi-byte locale, rather than give an error. Additional checks have been added to mitigate this. apply(a, M, function(u) c(X = ., Y = .))
again has dimnames containing “X” and “Y” (as in R < 3.2.0).- (Windows only) In some cases, the
--clean
option toR CMD INSTALL
could fail. (PR#16178) - (Windows only)
choose.files()
would occasionally include characters from the result of an earlier call in the result of a later one. (PR#16270) - A change in
RSiteSearch()
in R 3.2.0 caused it to submit invalid URLs. (PR#16329) Rscript
and command lineR
silently ignored incomplete statements at the end of a script; now they are reported as parse errors. (PR#16350)- Parse data for very long strings was not stored. (PR#16354)
plotNode()
, the workhorse of theplot
method for"dendrogram"
s is no longer recursive, thanks to Suharto Anggono, and hence also works for deeply nested dendrograms. (PR#15215)- The parser could overflow internally when given numbers in scientific format with extremely large exponents. (PR#16358)
- If the CRAN mirror was not set,
install.packages(type = "both")
and related functions could repeatedly query the user for it. (Part of PR#16362) - The low-level functions
.rowSums()
etc. did not check the length of their argument, so could segfault. (PR#16367) - The
quietly
argument oflibrary()
is now correctly propagated from.getRequiredPackages2()
. - Under some circumstances using the internal PCRE when building R fron source would cause external libs such as
-llzma
to be omitted from the main link. - The .Primitive default methods of the logic operators, i.e.,
!
,&
and|
, now give correct error messages when appropriate, e.g., for`&`(TRUE)
or`!`()
. (PR#16385) cummax(x)
now correctly propagatesNA
s also whenx
is of typeinteger
and begins with anNA
.summaryRprof()
could fail when the profile contained only two records. (PR#16395)- HTML vignettes opened using
vignette()
did not support links into the rest of the HTML help system. (Links worked properly when the vignette was opened usingbrowseVignettes()
or from within the help system.) arima(*, xreg = .)
(for d >= 1) computes estimated variances based on a the number of effective observations as in R version 3.0.1 and earlier. (PR#16278)slotNames(.)
is now correct for"signature"
objects (mostly used internally in methods).- On some systems, the first string comparison after a locale change would result in
NA
.
Hi Tal,
updateR() fails to copy my package library across because I keep it here:
C:\Users\Username\Documents\R\win-library\3.2
to avoid problems with permissions on Windows. I believe this is now the default behaviour on Windows when install.packages() detects that it doesn’t have write permission for the Program Files folder.
Could you add a user prompt to updateR, so that it asks for the correct path? Perhaps together with some suggestions of where to look. Alternatively add a few lines to your regular “update R” blog post – to warn Windows users that they might still need to manually copy their library across.
Thanks!
HI…i try to follow ur guide, but i got an error message when i type installr::updateR(), the error message is Error in file(con, “r”) : cannot open the connection
what should i do to solve it?
Hi there,
Just type:
setInternet2(TRUE)
Thanks Mr Tal, its work…:)
My pleasure 🙂