通过字符“&&引用;由args到R
以下R代码将由命令提示符(windows)执行 问题是命令提示符会做出响应通过字符“&&引用;由args到R,r,args,rscript,R,Args,Rscript,以下R代码将由命令提示符(windows)执行 问题是命令提示符会做出响应 hola 'chao' is not recognized as an internal or external command, operable program or batch file. C:\Users\Owner\Desktop> 我需要R接受“&”作为字符,并在cat()中一起打印它 我该怎么办? 谢谢这不是R的问题,而是外壳的问题。你真的执行了 Rscript prueba.r hola&
hola
'chao' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Owner\Desktop>
我需要R接受“&”作为字符,并在cat()中一起打印它
我该怎么办?
谢谢这不是R的问题,而是外壳的问题。你真的执行了
Rscript prueba.r hola&chao
而不是
Rscript prueba.r "hola&chao"
在Windows命令shell中
prog1 & prog2
按顺序执行两个程序,这就是为什么会看到
Rscript prueba.r hola
然后是
chao
另一种可能是,Rscript
是一个有缺陷的批处理文件。您非常正确,谢谢
Rscript prueba.r hola
chao