|
|
|
|
|
The scripts in this repository consist on a pure [R](https://www.r-project.org/) package,
|
|
The scripts in this repository consist on a pure [R](https://www.r-project.org/) package,
|
|
but it has several dependencies which can be installed by the following
|
|
but it has several dependencies which can be installed by the following
|
|
instructions.
|
|
instructions.
|
|
|
|
|
|
All the required packages should work on any platform and on linux based systems.
|
|
All the required packages should work on any platform and on linux based systems.
|
|
The code has been tested in R v3.5.1 and in R v3.6.3
|
|
The code has been tested in R v3.5.1 and in R v3.6.3
|
... | @@ -34,20 +34,20 @@ requires |
... | @@ -34,20 +34,20 @@ requires |
|
Install dependencies with conda (all platforms)
|
|
Install dependencies with conda (all platforms)
|
|
----------------------------------
|
|
----------------------------------
|
|
|
|
|
|
This is the recommended way to install all the dependencies. So when the code is ran,
|
|
This is the recommended way to install all the dependencies. So when the code is run,
|
|
either in a laptop or cluster you don't have to re-install the R packages for a new session.
|
|
either in a laptop or cluster you don't have to re-install the R packages for a new session.
|
|
|
|
|
|
**Prerequisites**
|
|
**Prerequisites**
|
|
|
|
|
|
You should have a recent version of the [conda](https://docs.conda.io/en/latest/)
|
|
You should have a recent version of the [conda](https://docs.conda.io/en/latest/)
|
|
package manager.
|
|
package manager.
|
|
|
|
|
|
You can get [conda](https://docs.conda.io/en/latest/) by installing
|
|
You can get [conda](https://docs.conda.io/en/latest/) by installing
|
|
[miniconda](https://docs.conda.io/en/latest/miniconda.html), which is what we recommend
|
|
[miniconda](https://docs.conda.io/en/latest/miniconda.html), which is what we recommend
|
|
here to keep track of your R environment.
|
|
here to keep track of your R environment.
|
|
|
|
|
|
See the following blog post:
|
|
See the following blog post:
|
|
[using the R language with Anaconda,](https://docs.anaconda.com/anaconda/user-guide/tasks/using-r-language/)
|
|
[using the R language with Anaconda,](https://docs.anaconda.com/anaconda/user-guide/tasks/using-r-language/)
|
|
for more information.
|
|
for more information.
|
|
|
|
|
|
**Conda environment**
|
|
**Conda environment**
|
... | @@ -59,7 +59,7 @@ to use in every run by: |
... | @@ -59,7 +59,7 @@ to use in every run by: |
|
conda create -n r_env r-essentials r-base
|
|
conda create -n r_env r-essentials r-base
|
|
~~~
|
|
~~~
|
|
|
|
|
|
Then activate it:
|
|
Then activate it:
|
|
~~~
|
|
~~~
|
|
conda activate r_env
|
|
conda activate r_env
|
|
~~~
|
|
~~~
|
... | @@ -117,14 +117,14 @@ system. Then, clone the latest repository version: |
... | @@ -117,14 +117,14 @@ system. Then, clone the latest repository version: |
|
git clone git@git.noc.ac.uk:brecinosrivas/icoads-r-hostace.git
|
|
git clone git@git.noc.ac.uk:brecinosrivas/icoads-r-hostace.git
|
|
~~~
|
|
~~~
|
|
|
|
|
|
If you are inside [JASMIN](https://help.jasmin.ac.uk/article/185-generate-ssh-key-pair),
|
|
If you are inside [JASMIN](https://help.jasmin.ac.uk/article/185-generate-ssh-key-pair),
|
|
you might have to configure your **Gitlab** ssh keys (under **Gitlab Profile >> Settings > Ssh keys**).
|
|
you might have to configure your **Gitlab** ssh keys (under **Gitlab Profile >> Settings > Ssh keys**).
|
|
And add a JASMIN pub key to your profile (generated from within a JASMIN's sci-server).
|
|
And add a JASMIN pub key to your profile (generated from within a JASMIN's sci-server).
|
|
This in order to enable access from JASMIN sci servers to your NOC gitlab platform and
|
|
This in order to enable access from JASMIN sci servers to your NOC gitlab platform and
|
|
to clone the repository within one of JASMIN's sci servers.
|
|
to clone the repository within one of JASMIN's sci servers.
|
|
|
|
|
|
For more information on gitlab ssh keys [click here](https://git.noc.ac.uk/help/ssh/README.md).
|
|
For more information on gitlab ssh keys [click here](https://git.noc.ac.uk/help/ssh/README.md).
|
|
|
|
|
|
Now you can go to the repository by:
|
|
Now you can go to the repository by:
|
|
|
|
|
|
~~~
|
|
~~~
|
... | @@ -138,7 +138,7 @@ And the `ls` of the repository should look like this: |
... | @@ -138,7 +138,7 @@ And the `ls` of the repository should look like this: |
|
config.yml README.md rscripts rutils scr
|
|
config.yml README.md rscripts rutils scr
|
|
~~~
|
|
~~~
|
|
|
|
|
|
Modify the `config.yml` according to where do you want your input/output
|
|
Modify the `config.yml` according to where do you want your input/output
|
|
data to reside. For example, I have added a new folder called: `output_data`.
|
|
data to reside. For example, I have added a new folder called: `output_data`.
|
|
|
|
|
|
So my local copy of the repository looks like this:
|
|
So my local copy of the repository looks like this:
|
... | @@ -148,7 +148,7 @@ So my local copy of the repository looks like this: |
... | @@ -148,7 +148,7 @@ So my local copy of the repository looks like this: |
|
config.yml output_data README.md rutils OPFILES rscripts scr
|
|
config.yml output_data README.md rutils OPFILES rscripts scr
|
|
~~~
|
|
~~~
|
|
|
|
|
|
OPFILES is my logging directory.
|
|
OPFILES is my logging directory.
|
|
|
|
|
|
Each script in `rscript` will take input data from this folder and write the output to this same folder (e.g. [simple_dup.R](https://git.noc.ac.uk/brecinosrivas/icoads-r-hostace/-/blob/master/rscripts/simple_dup.R#L62)).
|
|
Each script in `rscript` will take input data from this folder and write the output to this same folder (e.g. [simple_dup.R](https://git.noc.ac.uk/brecinosrivas/icoads-r-hostace/-/blob/master/rscripts/simple_dup.R#L62)).
|
|
|
|
|
... | @@ -160,4 +160,3 @@ CROSS_MOORED MFILES_PLAT MFILES_SHIP_IDPROC SHIP_CLEAN |
... | @@ -160,4 +160,3 @@ CROSS_MOORED MFILES_PLAT MFILES_SHIP_IDPROC SHIP_CLEAN |
|
MFILES_COAST MFILES_REJECT MFILES_SHIP_PROC
|
|
MFILES_COAST MFILES_REJECT MFILES_SHIP_PROC
|
|
MFILES_DRIFT MFILES_RESEARCH NEW_DUP_FILES
|
|
MFILES_DRIFT MFILES_RESEARCH NEW_DUP_FILES
|
|
~~~ |
|
~~~ |
|
|
|
|