Copy instructor’s code/data to your home directory
If your instructor has uploaded code and/or data to the shared drive (this is the shared_data directory within your Home directory) then the first thing you should do before using these files is to copy them to your Home directory. These copies will serve as your own personal version of the files, which you can modify as you wish.
There are several different ways you can copy files from the shared_data directory to your Home directory, depending on whether you’d prefer to use the command line or a GUI. Here are the options:
RStudio
Using Terminal
- Click on the
Terminaltab on the top left panel, next toConsole. - Copy the file(s) or directories you want from the
shared_datadirectory to your home directory:cp -r shared_data/<file-or-directory-you-want>/ .

Using shell commands in the R console
- Copy the file(s) or directories you want from the
shared_datadirectory to your home directory by running the following command in the console:system("cp -r ~/shared_data/<file-or-directory-you-want>/ .")

Jupyter
Using Terminal
- Click on the
Newdropdown on the right side of the page. - Select
Terminalfrom the dropdown menu.

- A new browser tab will open. Copy the file(s) or directories you want from the
shared_datadirectory to your home directory:cp -r shared_data/<file-or-directory-you-want>/ .

- Close the browser tab containing the Terminal (do not click
logout!). Go back to the previous browser tab to access Jupyter again.
Using shell commands in cells
- Open an existing Jupyter Notebook or create a new notebook.

- In a new cell, copy the file(s) of interest to your home directory:
!cp -r ~/shared_data/<file-or-directory-you-want>/ .


