在Windows 10上安装和删除odbc R包

在Windows 10上安装和删除odbc R包,r,odbc,install.packages,R,Odbc,Install.packages,我正在尝试安装odbc R包 install.packages('odbc') 生成: trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/odbc_1.3.0.zip' Content type 'application/zip' length 1319460 bytes (1.3 MB) downloaded 1.3 MB package ‘odbc’ successfully unpacked and MD5 sum

我正在尝试安装odbc R包

install.packages('odbc')
生成:

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/odbc_1.3.0.zip'
Content type 'application/zip' length 1319460 bytes (1.3 MB)
downloaded 1.3 MB

package ‘odbc’ successfully unpacked and MD5 sums checked
Warning in install.packages :
  cannot delete reparse point 'C:\Users\some_user\OneDrive - some_place\Documents\R\R-4.0.2\library/odbc/R', 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 ‘odbc’
Warning in install.packages :
  cannot delete reparse point 'C:\Users\some_user\OneDrive - some_place\Documents\R\R-4.0.2\library/odbc/R', 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 ‘odbc’

The downloaded binary packages are in
    C:\Users\some_user\AppData\Local\Temp\Rtmpkxsb1x\downloaded_packages
我试图从上面的消息中搜索一些信息,但运气不佳

我也试过了

remove.packages('odbc')
但是回来了:

Removing package from ‘C:/Users/some_user/OneDrive - some_place/Documents/R/R-4.0.2/library’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘odbc’
这是我的R版本

> version
               _                           
platform       x86_64-w64-mingw32          
arch           x86_64                      
os             mingw32                     
system         x86_64, mingw32             
status                                     
major          4                           
minor          0.2                         
year           2020                        
month          06                          
day            22                          
svn rev        78730                       
language       R                           
version.string R version 4.0.2 (2020-06-22)
nickname       Taking Off Again 
我在Windows10上


有什么建议吗?

看起来很像。也许。我倾向于在本地驱动器上使用R:问题较少。当包中包含DLL并且R已经加载了它时,R会这样做;我发现即使我拆下包,情况也是如此。在不加载项目的
.Rdata
的情况下重新启动R,然后尝试安装它。我从未将包“安装”到不完全本地的目录/驱动器,我发现许多人在onedrive装载时遇到问题,这与我期望的网络驱动器类似。如果不需要在onedrive上安装软件包,请不要使用该目录,句号。如果您必须使用我的函数。@r2evans,是的,我感觉onedrive不正确地锁定了文件。我在tensorflow和dropbox上也看到过类似的问题。(如果您已经安装了带有R的
,那么您也可以使用它,前提是相同的。)