|
1 | | -# RStudio via OnDemand |
2 | | - |
3 | | -!!! warning |
4 | | - |
5 | | - NeSI OnDemand is in development and accessible to early access users only. |
6 | | - If you are interested in helping us test it please [contact us](mailto:support@nesi.org.nz). |
| 1 | +# RStudio |
7 | 2 |
|
8 | 3 | ## Logging in |
9 | 4 | {width=35%} {fig.align="right" width=62%} |
10 | 5 |
|
11 | 6 | ## Settings |
12 | 7 | Recommendation to set *Save Workspace to Never* to avoid saving large files to the workspace. This can be done by going to `Tools` -> `Global Options` -> `General` and setting the `Save workspace to .RData on exit` to `Never`. This will prevent the workspace from being unable to load due to not enough memory in the selected session. |
13 | 8 |
|
14 | | -## Bugs |
15 | | - |
16 | 9 | ### Plots not showing |
17 | | -The current R modules on NeSI OnDemand do not support the default graphics device due to a missing depedency, `cairo`. There is a one off fix for this by changing the backend graphics device from `Default` to `AGG` (Anti-Grain Geometry) in the RStudio settings. |
| 10 | +The current R modules on OnDemand do not support the default graphics device due to a missing depedency, `cairo`. There is a one off fix for this by changing the backend graphics device from `Default` to `AGG` (Anti-Grain Geometry) in the RStudio settings. |
18 | 11 |
|
19 | 12 | This can be done by going to `Tools` -> `Global Options` -> `Graphics` and switch `Default` to `AGG`. This will allow the plots to be displayed in the RStudio interface. You do not need to restart the RStudio session for this to take effect. |
20 | 13 |
|
21 | 14 |  |
22 | 15 |
|
23 | 16 | Modules from 4.4 onwards will have this issue fixed. |
24 | | - |
25 | | -### Libraries not showing |
26 | | -There is a bug with the R-Geo and R-bundle-Biocondutor libraries not showing up in the RStudio interface. This is a known issue and is being worked on. There are two workarounds for this issue: |
27 | | - |
28 | | -1. Manually add the library to `.libPaths()` in the R console as shown below: |
29 | | - |
30 | | -```R |
31 | | -myPaths <- .libPaths() |
32 | | -myPaths <- c(myPaths, "/opt/nesi/CS400_centos7_bdw/R-Geo/4.3.2-foss-2023a") |
33 | | - |
34 | | -# reorder paths |
35 | | -myPaths <- c(myPaths[1], myPaths[3], myPaths[2]) |
36 | | - |
37 | | -# reasign the library paths |
38 | | -.libPaths(myPaths) |
39 | | - |
40 | | -# confirm the library paths |
41 | | -.libPaths() |
42 | | -[1] "/nesi/home/$USER/R/foss-2023a/4.3" |
43 | | -[2] "/opt/nesi/CS400_centos7_bdw/R-Geo/4.3.2-foss-2023a" |
44 | | -[3] "/opt/nesi/CS400_centos7_bdw/R/4.3.2-foss-2023a/lib64/R/library" |
45 | | -``` |
46 | | -2. Permanent fix by adding the library path(s) to the `.Rprofile` file in your home directory. This will automatically add the library path to the R console when it starts up. Copy and Paste the following lines to the file: |
47 | | - |
48 | | -``` |
49 | | -# CHECK LIBRARY PATHS |
50 | | -myPaths <- .libPaths() |
51 | | -newPaths <- c("/opt/nesi/CS400_centos7_bdw/R-Geo/4.3.1-gimkl-2022a", |
52 | | - "/opt/nesi/CS400_centos7_bdw/R-bundle-Bioconductor/3.17-gimkl-2022a-R-4.3.1> |
53 | | -
|
54 | | -# join the two lists |
55 | | -myPaths <- c(myPaths, newPaths) |
56 | | -
|
57 | | -# reassign the library paths |
58 | | -.libPaths(myPaths) |
59 | | -``` |
60 | | -NOTE: Replace the paths with the correct paths for the libraries you want to add. |
0 commit comments