0
鬆懈我試圖使用slackr
包來推送消息和文件從R鬆弛。無法發送文件從R使用slackrUpload
我能夠使用slackr
成功發送消息,但一直無法獲得功能slackrUpload
的工作。任何建議,將不勝感激
我第一次建立一個傳入webhook鬆弛。當時我能夠得到以下工作(這發出了「測試信息」的通道「解決方案」:
> library(slackr)
> slackrSetup(channel = "#solutions",
icon_emoji = ":information_source:",
incoming_webhook_url ="https://hooks.slack.com/services/T.../B.../I...",
api_token = "...-...-...")
> slackr("Test message")
...但是當我嘗試使用slackrUpload
功能錯誤:
> html_file <- "url_path/checks.html"
> slackrUpload(filename = html_file)
返回錯誤:
Error in data.frame(id = x$id, name = x$name, real_name = x$real_name) :
arguments imply differing number of rows: 1, 0
(我測試過的路徑,HTML是正確的)
R會話信息:
> sessionInfo()
R version 3.2.1 RC (2015-06-10 r68509)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 14.04.3 LTS
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] slackr_1.2 ggplot2_2.1.0 data.table_1.9.6 jsonlite_0.9.19 httr_1.1.0
loaded via a namespace (and not attached):
[1] colorspace_1.2-6 scales_0.4.0 plyr_1.8.3 R6_2.1.2 tools_3.2.1 gtable_0.2.0 curl_0.9.6 Rcpp_0.12.3 grid_3.2.1 chron_2.3-47 munsell_0.4.3
感謝您的回覆。我使用'devtools :: install_github(「hrbrmstr/slackr」)'將軟件包版本從1.2移動到1.4.1.9000('packageVersion(「slackr」)'),但是這個最新版本甚至不會將消息從鬆弛轉移到r? –