R语言接收命令行参数
Args <- commandArgs()
print(Args)
调用结果如下:
$ Rscript correctReads.R 1 2 3
[1] "/Library/Frameworks/R.framework/Resources/bin/exec/R"
[2] "--slave"
[3] "--no-restore"
[4] "--file=correctReads.R"
[5] "--args"
[6] "1"
[7] "2"
[8] "3"
R语言接收命令行参数
Args <- commandArgs()
print(Args)
调用结果如下:
$ Rscript correctReads.R 1 2 3
[1] "/Library/Frameworks/R.framework/Resources/bin/exec/R"
[2] "--slave"
[3] "--no-restore"
[4] "--file=correctReads.R"
[5] "--args"
[6] "1"
[7] "2"
[8] "3"
本文标题:R语言接收命令行参数
本文链接:https://www.haomeiwen.com/subject/etpsfttx.html
网友评论