User Tools

Site Tools


tools:rtools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
tools:rtools [2021/12/02 14:41]
aho [2021]
tools:rtools [2021/12/02 14:53]
nperez
Line 1: Line 1:
 The R tools can be used for postprocessing experiments: loading data, computing prediction scores, indices or calibrate experiments as well as plotting, formating data and saving data. Furthermore, by dividing the data in chunks, you can speed your execution by using startR.  The R tools can be used for postprocessing experiments: loading data, computing prediction scores, indices or calibrate experiments as well as plotting, formating data and saving data. Furthermore, by dividing the data in chunks, you can speed your execution by using startR. 
  
-You can join the [[http://mailman3.bsc.es/postorius/lists/earth-rtools.bsc.es/|Earth RTools mailing list]] to receive the latest updates about news. Check the list of R tips below to learn about BSC-ES infrastructure and other R tips.+You can join the [[http://mailman3.bsc.es/postorius/lists/earth-rtools.bsc.es/|Earth RTools mailing list]] to receive the latest updates about news. Check the list of R tips below to learn about **BSC-ES infrastructure** and other R tips.
  
 The list of functions in each department R package and the R modules with library versions can be found [[https://docs.google.com/spreadsheets/d/1gA-O1WkgH50VnyxOz9gbec_DsyvWMkyF-9SlFANXLqI/edit#gid=1328408011| here]]. The list of functions in each department R package and the R modules with library versions can be found [[https://docs.google.com/spreadsheets/d/1gA-O1WkgH50VnyxOz9gbec_DsyvWMkyF-9SlFANXLqI/edit#gid=1328408011| here]].
Line 81: Line 81:
 General R solutions that are useful in the department but doesn't belong exclusively to an in-house R package will be listed here. General R solutions that are useful in the department but doesn't belong exclusively to an in-house R package will be listed here.
  
-**1. How to change a CDO version in your open R session**+ 
 +**1. BSC-ES infrastructure** 
 + 
 + 
 +How to access, what you will find (servers, machines, partitions, modules) and how to open RStudio: check the slides and share them with your colleagues. {{ :tools:what_do_we_know_about_bsc-es_infrastructure_.pdf |slides}}  
 + 
 + 
 +**2. How to change a CDO version in your open R session**
  
  
Line 97: Line 104:
 in your terminal in your terminal
  
-**2. How to load dependencies of R package sf**+**3. How to load dependencies of R package sf**
  
 This package could be used by loading the following modules in this specific order: This package could be used by loading the following modules in this specific order:
Line 109: Line 116:
 Note2: to use library RNetCDF `module load HDF5/1.10.5-foss-2015a` is required. Note2: to use library RNetCDF `module load HDF5/1.10.5-foss-2015a` is required.
  
-**3. How to load dependencies of R package rgdal**+**4. How to load dependencies of R package rgdal**
  
 This package could be used by loading the following modules in this specific order: This package could be used by loading the following modules in this specific order:
Line 125: Line 132:
 Note: Avoid to include them in your bashrc, just load them when it is a requirement. Note: Avoid to include them in your bashrc, just load them when it is a requirement.
  
-**4. How to avoid Load error in R 3.6.1:  cdo -griddes core dumped**+**5. How to avoid Load error in R 3.6.1:  cdo -griddes core dumped**
  
 To avoid an error of Load because of the command CDO -griddes, a different version of HDF5 is required: To avoid an error of Load because of the command CDO -griddes, a different version of HDF5 is required:
Line 133: Line 140:
 The same requirement also applies to s2dv::CDORemap and startR::CDORemapper. The same requirement also applies to s2dv::CDORemap and startR::CDORemapper.
  
-**5. How to use 'rmapshaper' library in Nord3**+**6. How to use 'rmapshaper' library in Nord3**
  
 To correctly use the R library rmapshaper in Nord3, you need to load the following modules in advance: To correctly use the R library rmapshaper in Nord3, you need to load the following modules in advance:
Line 140: Line 147:
  
  
-**6. How to avoid plotting issues (as fuzzy labels) in Nord3**+**7. How to avoid plotting issues (as fuzzy labels) in Nord3**
  
 To save good quality plots created in Nord3, the library 'ragg' is necessary. It is already installed, so, in your R code or R session, before generating the plot, load the library, and use agg_png() function to define the name, size and resolution of your plot. Then, create your plot and close the device. Here, there are two examples: To save good quality plots created in Nord3, the library 'ragg' is necessary. It is already installed, so, in your R code or R session, before generating the plot, load the library, and use agg_png() function to define the name, size and resolution of your plot. Then, create your plot and close the device. Here, there are two examples:
Line 165: Line 172:
     dev.off()     dev.off()
  
-**7. Error *** caught segfault *** address 0x18, cause 'memory not mapped'**+**8. Error *** caught segfault *** address 0x18, cause 'memory not mapped'**
  
 If this error appears, check that the partition `/dev/shm/` is empty. In case, trash files are occupying this partition, the process you are running may fail. **Remove the files and re-run your code.** If this error appears, check that the partition `/dev/shm/` is empty. In case, trash files are occupying this partition, the process you are running may fail. **Remove the files and re-run your code.**
  
 If the error persists, **check your code with a smaller data sample** to discard a problem with your code since this error message indicates that you are requesting more memory than the available. If the error persists, **check your code with a smaller data sample** to discard a problem with your code since this error message indicates that you are requesting more memory than the available.
tools/rtools.txt · Last modified: 2024/05/02 14:43 by vagudets