Using R in Linux ---09/20/2017

来源:互联网 发布:注册淘宝店铺佣金260 编辑:程序博客网 时间:2024/05/16 14:03

1, Two ways to implement R code in Linux:

The first is 

<< R                      which would lead you into the shell.
While the second is 
<< Rscript <the location of your R code>     which would directly implement the R script you have already written. 

2, Load workspace:

Firstly, enter the shell as mentioned above. Then input the following code:

load ("Rresults/seasonal/HadCRUT/H_spring.RData")


3, One way to automatically load the modules you need every time you log in the Tianhe2 account by using the following command firstly.

vi ~/.bashrc

Then, for example, to add the JAGS module.

module load JAGS

4, When I implemented a script in R, I found that it just kept being killed. It is possible that this script takes up too much memory and the Tianhe2 would directly kill it. This problem requires future research.





原创粉丝点击