csv中的Rscript意外数字常量

csv中的Rscript意外数字常量,r,R,我试图使用Rscript命令调用的R脚本从制表符分隔的文件读入数据。在脚本中,调用如下所示: # within R script called via Rscript df <- read.csv(file="sig_ids_MCF7_6.mat", header=F, sep="\t") # produces the error "Error: unexpected numeric constant in "CPD001_MCF7_6H:BRD-A02759312-003-17-9

我试图使用Rscript命令调用的R脚本从制表符分隔的文件读入数据。在脚本中,调用如下所示:

# within R script called via Rscript
df <- read.csv(file="sig_ids_MCF7_6.mat", header=F, sep="\t")
# produces the error "Error: unexpected numeric constant in "CPD001_MCF7_6H:BRD-A02759312-003-17-9   0.357200026512"
# Execution halted

我在MacOSX版本10.7.5上运行64位R版本2.15.1。知道为什么会这样吗?我一直在谷歌上搜索,运气不好。非常感谢。

解决了:愚蠢的错误,我的命令参数顺序错误,Rscript试图将数据文件作为脚本运行。我的道歉。

解决了:愚蠢的错误,我的命令参数顺序错误,Rscript试图将数据文件作为脚本运行。我道歉

# within R console
df <- read.csv(file="sig_ids_MCF7_6.mat", header=F, sep="\t")
$ head -n 3 sig_ids_MCF7_6.mat | cut -f 1-6
CPD001_MCF7_6H:BRD-A02759312-003-17-9   0.357200026512  -1.81755006313  1.26394999027   0.998450040817  0.267199993134
CPC020_MCF7_6H:BRD-A23290232-001-02-3   0.371100068092  0.52954274416   0.0509457141161 0.202583178878  0.667555570602
CPC016_MCF7_6H:BRD-K98521173-001-03-8   -0.513105690479 -0.618193089962 -0.177318453789 0.425470650196  0.0688976272941