[英]Script test seems to not have correct working directory
我正在嘗試查看是否可以在我的用戶帳戶而不是testuser
帳戶中運行代碼示例。 為此,我做了以下工作:
testuser
下創建了一個example-fraud-score
文件夾,位於以下位置: https ://msdn.microsoft.com/zh-cn/microsoft-r/deployr-data -科學家入門 ) analytics/
的內容到DeployR服務器上的example-fraud-score
目錄。 ccFraudScore.R
,其內容在這里: https : //github.com/Microsoft/js-example-fraud-score-basics/blob/master/analytics/ccFraudScore.R使用右側的“測試”選項卡在DeployR中單擊文件名后。 當我這樣做時,我得到了錯誤:
Connecting to 172.31.232.190:8000
3:53:26 PM Stream Connect matthew.pettis connection established, waiting for an event...
> require(deployrUtils)
> deployrInput("{\"name\": \"bal\", \"render\":\"integer\", \"default\": 5000, \"min\" : 0, \"max\": 25000 }")
> deployrInput("{\"name\": \"trans\", \"render\":\"integer\", \"default\": 12, \"min\" : 0, \"max\": 100 }")
> deployrInput("{\"name\": \"credit\", \"render\":\"integer\", \"default\": 8, \"min\" : 0, \"max\": 75 }")
> if (!exists("fraudModel")) {
+ load("fraudModel.rData")
Console Error cannot open the connection
API Error cannot open the connection
我嘗試按照此處的帖子進行故障排除,但找不到目錄所在的位置: deployR無法打開連接
當我使用腳本查找工作目錄(和列表內容)時,我看到:
> require(deployrUtils)
> getwd()
[1] "C:/PROGRA~1/MICROS~2/DEPLOY~1.0/rserve/workdir/conn2209460"
> list.files(getwd())
[1] "DeployREngineSource.r" "unnamedplot001.png"
這似乎是使用錯誤的目錄。 當我嘗試為用戶尋找目錄時,似乎找不到它。 我的DeployR版本是8.0.0。
感謝幫助。
謝謝,馬特
那是遠程目錄(第二個方框)嗎? 如果是這樣,為什么不調用setwd()
呢?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.