我是 R 的初学者。如果你觉得这个问题很幼稚,请原谅我。
我需要R studio
使用 Windows运行以下命令CMD
。
copy *.txt combinedfiles.txt
这个命令在 Windows 中实际上将所有文件合并为一个文件CMD
。
我尝试使用system()
和system2()
。但我无法得到结果。例如:
system(cmd.exe copy *.txt combinedfiles.txt)
请帮我解决这个问题。
copy
不是独立程序,而是 Windows 命令行解释器的内置命令。要运行它,请shell
在 R 中使用。
shell("copy *.txt combinedfiles.txt")
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句