简体   繁体   English

如何在 ubuntu 上运行 R 文件?

[英]How do you run an R file on ubuntu?

I tried to run an Rscript file from my ubuntu terminal on the server using the code:我尝试使用以下代码从服务器上的 ubuntu 终端运行 Rscript 文件:

Rscript etl/ConceptTables/loadTables.R mimiciii"

The file is located in stated directory below but I need to run the script from the root directory.该文件位于下面的指定目录中,但我需要从根目录运行脚本。 However, it is saying this file does not exist but it clearly does.但是,它说这个文件不存在,但它显然存在。 I also tried running this by entering the R environment first but instead, I get:我也尝试通过首先进入 R 环境来运行它,但相反,我得到:

"Error: Unexpected symbol in "etl/ConceptTables/loadTables.R mimiciii"

I am following instructions from this mimic-omoop ETL on github here: https://github.com/chichukw/mimic-omop/blob/master/README-run-etl.md and I already created the cpg file with my username and database name.我在这里遵循 github 上的这个模仿-omoop ETL 的说明: https://github.com/chichukw/mimic-omop/blob/master/README-run-etl.md我已经用我的用户名和数据库名称。 Could anyone clarify what I am doing wrong?谁能澄清我做错了什么?

Try using the full path of the file.尝试使用文件的完整路径。 The error you have posted is "Unexpected symbol"您发布的错误是“意外符号”

Could be because you have added a double quote at the end of mimiciii.可能是因为您在 mimiii 的末尾添加了双引号。 Or is it a mistake while posting the question?还是发布问题时出错?

If you are using double quotes for the path, ensure that it is " and not “.如果您对路径使用双引号,请确保它是“而不是”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM