比如,一个R脚本,test.R
file.create("a.txt")
dir.create("test")
system2("ln",args = c("-s","a.txt","./test"),stderr = T)
system2("ln",args = c("-s","a.txt","./test"),stderr = T)
当我运行Rscript test.R
时,退出状态码是0。
应该怎么让这个脚本在第二次调用system2("ln",args = c("-s","a.txt","./test"),stderr = T)
时候报错停止呢