【发布时间】:2015-12-18 02:47:46
【问题描述】:
我有一个在 RStudio 中运行良好的 R 脚本。我正在尝试使用 RScript.exe 安排它在 Windows 任务计划程序中定期运行。失败了。
然后我尝试从命令行运行它并注意到下面的错误。
D:\development\projects\SSCDAPOC\trunk\src\scripts>"C:\Program Files\R\R-3.2.2\bin\x64\Rscript.exe" batch_read_rss_selected.R
Loading required package: xml2
Error in as.vector(x, "list") :
cannot coerce type 'environment' to vector of type 'list'
Calls: do.call ... <Anonymous> -> lapply -> as.list -> as.list.default
Execution halted
当我直接在 RStudio 中获取相同的脚本时,它工作得非常好。
关于如何调查和解决此问题的任何提示?
以下R会话信息以备使用:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_Singapore.1252 LC_CTYPE=English_Singapore.1252
[3] LC_MONETARY=English_Singapore.1252 LC_NUMERIC=C
[5] LC_TIME=English_Singapore.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] rvest_0.3.1 xml2_0.1.2
loaded via a namespace (and not attached):
[1] httr_1.0.0 selectr_0.2-3 R6_2.1.1 magrittr_1.5 tools_3.2.2 curl_0.9.4
[7] Rcpp_0.12.2 stringi_1.0-1 stringr_1.0.0 XML_3.98-1.3
【问题讨论】:
标签: r