【发布时间】:2015-12-28 02:02:47
【问题描述】:
我想在 R 中使用函数system2 设置命令提示符的工作目录,但出现以下错误:
system2("cmd.exe", args = paste("cd", "Users/AKatherine/Downloads", sep = " "))
'Akatherine' 未被识别为内部或外部命令, 可运行的程序或批处理文件。
另外,我尝试运行这个
system2("cmd.exe", args = "java -mx150m -cp "*;" edu.stanford.nlp.parser.lexparser.LexicalizedParser -outputFormat "penn,typedDependencies" -outputFormatOptions "basicDependencies" edu/stanford/nlp/models/lexparser/englishPCFG.ser.gz ./Test/input.txt")
并得到以下错误:
错误:意外的';'在 "system2("cmd.exe", args = "java -mx150m -cp "*;"
有人知道为什么吗?谁能帮我解决这个问题?
【问题讨论】:
-
我相当肯定您在转义字符方面存在问题。但也可能存在其他问题。
-
问题:命令
cd Users/AKatherine/Downloads对打开命令提示符的目录有意义吗?
标签: r cmd command-prompt