Unfortunately, I get pretty much the same error. This is the output when I try to install the sp package:
> install.packages("sp", dependencies = TRUE)
Installing package into ‘C:/USER/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependencies ‘xts’, ‘intervals’, ‘zoo’, ‘spacetime’, ‘FNN’, ‘gstat’, ‘deldir’
There are binary versions available but the source versions are later:
binary source needs_compilation
spacetime 1.2-4 1.2-5 FALSE
gstat 2.0-7 2.0-8 TRUE
deldir 0.2-10 1.0-2 TRUE
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/xts_0.12.1.zip'
Content type 'application/zip' length 947871 bytes (925 KB)
downloaded 925 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/intervals_0.15.2.zip'
Content type 'application/zip' length 1000548 bytes (977 KB)
downloaded 977 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/zoo_1.8-9.zip'
Content type 'application/zip' length 1038955 bytes (1014 KB)
downloaded 1014 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/FNN_1.1.3.zip'
Content type 'application/zip' length 637905 bytes (622 KB)
downloaded 622 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/gstat_2.0-7.zip'
Content type 'application/zip' length 2492331 bytes (2.4 MB)
downloaded 2.4 MB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/deldir_0.2-10.zip'
Content type 'application/zip' length 338863 bytes (330 KB)
downloaded 330 KB
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/sp_1.4-5.zip'
Content type 'application/zip' length 1810715 bytes (1.7 MB)
downloaded 1.7 MB
package ‘xts’ successfully unpacked and MD5 sums checked
package ‘intervals’ successfully unpacked and MD5 sums checked
package ‘zoo’ successfully unpacked and MD5 sums checked
package ‘FNN’ successfully unpacked and MD5 sums checked
package ‘gstat’ successfully unpacked and MD5 sums checked
package ‘deldir’ successfully unpacked and MD5 sums checked
package ‘sp’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot delete reparse point 'C:\USER\Documents\R\win-library\3.6/sp/libs', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
cannot remove prior installation of package ‘sp’
Warning in install.packages :
cannot delete reparse point 'C:\USER\Documents\R\win-library\3.6/sp/libs', reason 'There is a mismatch between the tag specified in the request and the tag present in the reparse point'
Warning in install.packages :
restored ‘sp’
The downloaded binary packages are in
C:\USER\AppData\Local\Temp\downloaded_packages
installing the source package ‘spacetime’
trying URL 'https://cran.rstudio.com/src/contrib/spacetime_1.2-5.tar.gz'
Content type 'application/x-gzip' length 2571457 bytes (2.5 MB)
downloaded 2.5 MB
* installing *source* package 'spacetime' ...
** package 'spacetime' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
** demo
** inst
** byte-compile and prepare package for lazy loading
Error in normalizePath(path.expand(path), winslash, mustWork) :
path[1]="C:/USER/Documents/R/win-library/3.6/sp/libs/x64": The tag present in the reparse point buffer is invalid
Calls: <Anonymous> ... loadNamespace -> library.dynam -> file.path -> normalizePath
Execution halted
ERROR: lazy loading failed for package 'spacetime'
* removing 'C:/USER/Documents/R/win-library/3.6/spacetime'
Warning in install.packages :
installation of package ‘spacetime’ had non-zero exit status
The downloaded source packages are in
‘C:\USER\AppData\Local\Temp\downloaded_packages’