1

I was trying to update my R version (3.4.3, a little old) but when i was trying to install 'installr' packages and load it, I got errors

> install.packages("installr")
trying URL 
'https://cran.rstudio.com/bin/windows/contrib/3.4/installr_0.20.0.zip'
Content type 'application/zip' length 265893 bytes (259 KB)
downloaded 259 KB

package ‘installr’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\abc001\AppData\Local\Temp\RtmpKUhjgr\downloaded_packages

> require(installr)
 Loading required package: installr
Loading required package: stringr
Error: package or namespace load failed for ‘stringr’ in library.dynam(lib, 
package, package.lib):
DLL ‘stringi’ not found: maybe not installed for this architecture?
Failed with error:  ‘package ‘stringr’ could not be loaded’
In addition: Warning messages:
1: package ‘installr’ was built under R version 3.4.4 
2: package ‘stringr’ was built under R version 3.4.4 

After reading the errors, i guess my current problem is that 'installr' needs 'stringr' but they are built on 3.4.4. So now how do I update my R version if 'installr' depends on new R version (at least 3.4.4) but my current version is (3.4.3)?

Thank you!

ASU_TY
  • 617
  • 2
  • 7
  • 12
  • I tried both (library and require) and they basically game me the same errors. – ASU_TY Sep 24 '18 at 21:22
  • `require()` is generally reserved for use inside other functions, as it can return a Boolean result. I think you have conflicting build versions floating around. Try removing `stringi`, `stringr`, and `installr` then install them again (if `installr` doesn't already for dependencies). – Anonymous coward Sep 25 '18 at 14:10

1 Answers1

4

Try installing the stringi library.

install.packages("stringi")

Then re-try installr.

require(installr)
jalind
  • 491
  • 1
  • 5
  • 11
  • I tried before and again this afternoon and still got error ; wonder if there is other way i can dodge 'installr' and update the version ? > require(stringi) Loading required package: stringi Failed with error: ‘package ‘stringi’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version’ In addition: Warning message: package ‘stringi’ was built under R version 3.5.1 – ASU_TY Sep 24 '18 at 21:19
  • There is a non-installr way to update r but it's (in my opinion) a bit more of a pain. If you are running Windows, you can go here: http://cran.stat.ucla.edu/ and download the latest version of R. Run the .exe file you download (just accept all defaults). Open up Rstudio. Go to tools -> global options. Up top you'll see an option for R version. Click change. Select version 3.5.1 (or whatever version you want to run). Restart Rstudio. Are you sure you re-installed stringi? – jalind Sep 24 '18 at 21:58