代码之家  ›  专栏  ›  技术社区  ›  RanonKahn

Bash等价于嵌入在R脚本中的PowerShell脚本,可在Rshiny服务器上运行

  •  1
  • RanonKahn  · 技术社区  · 9 年前

    url <- "curl 'https://[site.orgnaization.com/solr/someFolder/select?q=*:*&rows=1000&wt=csv' -L -u  username:password --location-trusted -b cookie-jar.txt > C:/Folder/Filename.csv"
    
    fileConn <- file("C:/Folder/PowerShellFile.ps1")
    writeLines(url, fileConn)
    close(fileConn)
    system2("PowerShell", args = c("-file", "C:\\Folder\\PowerShellFile.ps1"))
    
    DataFromSolr <- data.frame(read.csv("C:/Folder/Filename.csv",header = TRUE, sep = "," , fill = TRUE ,fileEncoding = "UTF-16LE"))
    
    1 回复  |  直到 9 年前
        1
  •  0
  •   RanonKahn    9 年前