Stringi Package Installation Failure

For the first problem, the package did not update to version 1.2.3 because that version is only available as source and R for Windows will typically default to installing the latest available binary (version 1.1.7). That's what the line "Binaries will be installed" in the output means. If this is happening to you more often recently, it's most likely because pre-compiled binaries aren't available for these packages with your combination of R version and OS version. You can force installation from source by calling:

install.packages("stringi", type = "source")

but for packages that include non-R code (such as stringi, which has major parts written in C++), you will need to have the Windows RTools installed correctly first. These are additional software tools installed separately from R. The key documentation and resources are:

Some people like using the package installr, which tries to make some of this stuff easier.

For the second problem, there are a couple of different things which I'm aware of that can cause this, all relating to security and anti-malware restrictions.

  • R doesn't always interact well with Windows User Account Control (see R for Windows FAQ 2.24). This can usually be solved by running R (or RStudio) as Administrator for sessions when you want to install or update packages.

  • Increasingly, it seems that anti-virus / anti-malware software will try to keep unauthorized programs from making changes to user directories, as a defense against ransomware. According to what I've read, this can include the new Windows Controlled Folder Access, which became available starting with Windows 10 version 1709. In these cases, people seem to solve the problem by turning off restrictions for R and RStudio within the anti-malware software settings.

A general note: both of these problems are more likely to do with R than with the RStudio IDE (what's the difference? see Differentiating R from RStudio). You can find out by trying the same actions when running R directly (e.g., by opening Rgui.exe). If you see the same problem, then it's not an RStudio IDE issue and it would be better to move the question to the #general category to cut down on noise in the #rstudio-ide category.