R does not find "update.packages"

Viewed 386

I am running R in version 3.4.1 under Windows 7 64-bit. When I give update.packages(ask=FALSE) the routine starts, identifies some packages to be updated, downloads packages, and then returns:

Error in update.packages(ask = FALSE) : 
  could not find function "update.packages"
Execution halted

I cannot find a reason for this problem. I just installed the newest version of R.


Complete output: I add the complete output. Maybe the problem is hidden in here, see e.g. the Warning messages. I shortened some paths (...). The problem seems to be with package knitr?

  There are binary versions available but the source versions are later:
      binary source needs_compilation
knitr   1.16   1.17             FALSE
rlang  0.1.1  0.1.2              TRUE

  Binaries will be installed
trying URL 'https://cran.wu.ac.at/bin/windows/contrib/3.4/rlang_0.1.1.zip'
Content type 'application/zip' length 466606 bytes (455 KB)
downloaded 455 KB

package ‘rlang’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
        C:\Users\...
installing the source package ‘knitr’

trying URL 'https://cran.wu.ac.at/src/contrib/knitr_1.17.tar.gz'
Content type 'application/x-gzip' length 769923 bytes (751 KB)
downloaded 751 KB

Error in update.packages(ask = FALSE) : 
  could not find function "update.packages"
Execution halted

The downloaded source packages are in
        ‘C:\Users\...’
Warning messages:
1: running command '"C:/PROGRA~1/R/R-34~1.1/bin/x64/R" CMD INSTALL -l "N:\RLibrary" C:\Users\...' had status 1 
2: In install.packages(update[instlib == l, "Package"], l, repos = repos,  :
  installation of package ‘knitr’ had non-zero exit status
0 Answers
Related