【发布时间】:2011-05-31 16:08:52
【问题描述】:
我有一个 bash 脚本,它创建一个 csv 文件和一个 R 文件,它从中创建图形。
在 bash 脚本结束时,我调用 Rscript Graphs.R 10
我得到的回复如下:
Error in is.vector(X) : subscript out of bounds
Calls: print ... <Anonymous> -> lapply -> FUN -> lapply -> is.vector
Execution halted
我的 Graphs.R 的前几行是:
#!/bin/Rscript
args <- commandArgs(TRUE)
CorrAns = args[1]
不知道我做错了什么?网上的建议对我来说似乎是说这应该有效。很难理解commandArgs
【问题讨论】: