2017-08-29 150 views
0

我能够从运行在Rshiny服务器上的R的SharePoint文件夹中打开文件。但是,无法将文件保存到同一文件夹。我收到如下所示的错误消息。我尝试了这里提供的解决方案Saving a file to Sharepoint with R,这里Copying file to sharepoint library in R没有运气。有什么建议么?将文件从R保存到SharePoint文件夹

df <- read.csv("http://sites.somecompany.com/sites/sitename/Documents/UserDocumentFolder/filename.csv") 

write.csv(df, "http://sites.somecompany.com/sites/sitename/Documents/UserDocumentFolder/filename2.csv") 

can only open URLs for readingError in file(file, ifelse(append, "a", "w")) : 
    cannot open the connection 

回答

0

我想这和它的工作:

system("curl --ntlm --user username:password --upload-file someFolder/FileToCopy.ext https://sites.somecompany.com/sites/sitename/Documents/UserDocumentFolder/FileToCopy.ext")