# HUNT Workbench FAQ
This page contain frequently asked questions about Workbench. Help us expand this section by sending us questions and ideas for new content.
- Which R version is available in RStudio?
- Which R packages are preinstalled?
- How do I install additional R packages?
- How do I install R packages not found in Conda?
- How can I use R in my workbench terminal?
- How can I recover my R environment in case of broken package installation?
- Can others use my R packages?
- How do I reset my user state in RStudio?
Head over to our HUNT Workbench troubleshooting section if something is not working as expected.
# Where is my data?
HUNT Workbench uses the same storages volumes as your home machine. This means that you can access all lab data, including your
home-directory, using the same paths in your scripts, for example:
# Where is my code stored?
Your Jupyter Notebooks and code files are stored in the following shared
work-volume on your home machine:
# Can I create my own Conda environment for Jupyter?
Yes. This allows you to install packages and package versions of your choice.
Below is an example on how you create a Conda environments with Python and IPython kernel from your workbench terminal::
mamba create -n <name> 'python~=3.10.*' 'ipykernel'
If you have older setup and missing mamba, you can use conda command instead:
mamba create -n <name> 'python~=3.10.*' 'ipykernel'
And here's an example on how to create a Conda environment with R and R-IRkernel kernel and commonly used packages:
mamba create -n <name> 'r-base>=4.0,<5.0' 'r-irkernel' 'r-devtools' 'r-remotes' 'r-dplyr' 'r-tidyverse' 'r-haven'
You need to replace
<name> with your own environment name in the example above, such as
# How can I start a Notebook with my new Conda environment?
You should see Notebooks with the
conda env-tag. Here are two examples of such Notebooks that are connected to custom Conda environments.
# How can I change a Conda environment for my Notebook?
You can change the Conda environment for your Jupyter Notebook when it is open: Open your Jupyter Notebook of choice and switch the kernel in the top right corner of menu:
You will be able to select default environments including MATLAB kernel and custom environments which contain either
ipykernel (Python) or
r-irkernel (R 4.0):
# Can others use packages I have installed?
Not directly. The packages you install in your Workbench are usually not shared. The separation prevent others from breaking your packages, for example during upgrades. However, you may utilize the powers of Conda to export the definition of your environments so others can use restore function to be able to use the very same packages that you use. Learn how to manage environments on docs.conda.io (opens new window) or skip directly to sharing an environment guide (opens new window).
# How can I share my Conda environments with others?
It might be handy to share your exact setup with your lab colleagues when you have perfected your workflows.
The packages that you have installed in your HUNT Workbench environment are usually not shared. The separation prevent others from breaking your packages and it allows you to explore packages without breaking the workflows of others.
So, to share environments you will need to export your environments definition to your colleagues so they can reuse them. Read more on how to share (opens new window) and manage Code environments on docs.conda.io (opens new window). Below is a principle guide run in your workbench terminal:
- In your Workbench:
# -- export your active environment conda env export > /mnt/scratch/test-environment.yml
- In your lab colleague's Workbench (run by your lab-colleague):
# -- create a new environment from the saved environment file conde env create -f /mnt/scratch/test-environment.yml # -- activate the environment (it will have the same name as your original environment) conda activate <name> # -- verify the installation conda env list
# How can I install apt packages?
We recommend that instead of using apt, you install your packages into your environment using Conda since these will be installed on disk and such be persistent during restarts. Regular
apt commands run in terminal will be removed during your next restart. Search Conda repository (opens new window) to identify your package name and get going with your installation.
Example with plink2 (opens new window) package:
mamba install -n default -c bioconda -y plink2 conda activate default plink2 --help
# How can I restart my workbench environment?
Sometimes you might want to start over with a fresh environment:
(1) Select control panel in top right corner:
(2) Then in the control panel hit stop server:
You can either start the new instance by hitting the button or by logging in again.
# Can I install Jupyter extensions?
No. Due to security reasons, we have disabled the Jupyter extension manager. Contact us if you would like useful extensions to be added to the HUNT Workbench.
# Are there any limitations to MATLAB in HUNT Workbench?
Yes, there are some limitations to the web-based version of MATLAB (MATLAB Online). Read more in the official documentation (opens new window) from MathWorks.
# How do I report issues with MATLAB?
Try to document the time when the issue occurred and save the error logs from your Status information window. Additionally, it would also help if you could take a screenshot of the error logs in the browser console. Usually you can open the console with the shortcuts:
CTRL + SHIFT + J (MacOS:
CMD + Option + J), although this may vary between browsers. Share the information with us on Slack or email.
# How can I increase the number of parallel workers?
If you already have "Parallel Computing Toolbox" and cannot set the higher number parallel workers in the pool, select
Parallel menu and click on
Create and Manage Clusters:
Edit and update the
NumWorkers value (usually number of CPUs):
# Can I install new toolboxes
We need to initiate such installation. Contact us on email if you need new toolboxes in your MATLAB installation.
# Which R version is available in RStudio?
RStudio is configured to use packages installed in the conda environment named
r-base. You can identify your current R version packages in your workbench terminal following these steps:
- Open your workbench terminal.
- List the packages in your r-base conda environment.
conda list -n r-base | grep r-base
# Which R packages are preinstalled?
Currently, we install your
r-base environment with the following conda packages:
- r-base - r-haven - r-irkernel - r-devtools - r-dplyr - r-remotes - r-tidyverse
If you have older setup and missing some of these packages you can follow the "How do I install additional R packages"-answer below to add them to your conda environment.
# How do I install additional R packages?
If you want to install your own R packages, we recommend that you use Conda where ever possible:
- Open your workbench terminal:
- Activate r-base environment
conda activate r-base
- Add packages to your
# -- Principal example conda install -n r-base -c conda-forge r-'<package-name>' r-'<another-package-name>' # -- Practical example* mamba install -n r-base -c conda-forge r-dplyr
For example, the above example installs the dplyr package (opens new window).
- When the installation is complete, open RStudio or R in your workbench and load your new package:
# -- Principal example library(<package-name>) # -- Practical example library(dplyr)
You can defer to alternative methods such as
install.packages() when the package is not available in Conda (see below).
# How do I install R packages not found in Conda?
If you don't find a R package in Conda as described above, you may need to defer to running the
install.packages() command inside R. We recommend to use
R in your workbench terminal for such installations (instead of installing directly in RStudio) to avoid broken environment states in RStudio. Packages installed into your
r-base environment through R in terminal should be available in RStudio.
Packages installed into
r-base environment through R in terminal will be available in RStudio.
Make sure to activate the
r-base environment before running R command.
conda activate r-base
# How can I use R in my workbench terminal?
First, open your workbench terminal.
Start by activating
conda activate r-base
Then run R inside your
# How can I recover my R environment in case of broken package installation?
Sometimes you may get errors about the
GLIBCXX library not being found and/or essential R packages are not working. This happens typically after installation of custom package. In such cases, you might consider to recreate your
r-base environment from scratch:
- Open your workbench terminal and run the following code to reset your
mamba create --yes -n r-base 'r-base>=4.0,<5.0' 'compilers' 'cmake' 'gmp' 'r-irkernel' 'r-devtools' 'r-remotes' 'r-dplyr' 'r-tidyverse' 'r-haven'
If you have older setup without mamba, use conda command instead:
conda create --yes -n r-base 'r-base>=4.0,<5.0' 'compilers' 'cmake' 'gmp' 'r-irkernel' 'r-devtools' 'r-remotes' 'r-dplyr' 'r-tidyverse' 'r-haven'
This removes custom packages that you might have installed.
# Can others use my R packages?
When you have perfected your workflows, you can share your setup with your colleagues, although not directly.
The R-packages in your HUNT Workbench environment are usually not shared. This separation prevent others from breaking your packages and it allows you to explore packages without breaking the workflow of others.
So, to share environments you will need to export your environments definitions so others can reuse them:
Learn how to manage environments on docs.conda.io (opens new window).
# How do I reset my user state in RStudio?
When you restart your HUNT Workbench, your RStudio user state might still be preserved. Read the RStudio support pages about how you can manually remove your user state (opens new window) to achieve a complete reset.
# Can I use a terminal from my workbench?
Yes. You can find your
workbench terminal in the main view of applications under the section:
# When do I need to use a terminal?
workbench terminal can be handy when it comes to managing Conda packages, monitoring resources (
htop), or handling other tasks.