Skip to content

Commit b62351d

Browse files
authored
Merge pull request #43 from carpentries-incubator/issue13-setup
updated setup to use R instead of Python
2 parents 1cfb66b + 66a4b2e commit b62351d

2 files changed

Lines changed: 41 additions & 129 deletions

File tree

learners/installation-instructions.md

Lines changed: 39 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ To go through the course material on your own or at a workshop, you will need th
66

77
- [Command line terminal (shell)](#command-line-terminal) (such as **Bash**, **Zsh** or **Git Bash**)
88
- [Git version control tool](#git-version-control-tool)
9-
- [Python 3](#python-3-distribution)
10-
- [Visual Studio Code (VS Code)](#visual-studio-code) integrated development environment (IDE)
9+
- [R](#r)
10+
- [RStudio](#rstudio) integrated development environment (IDE)
1111

1212
You will also need to [create a GitHub account](#github-account) if you do not have one already, make sure that you are able to log into it, and download the [Spacewalks data and analysis code](#spacewalks) which we will be used for exercises in the course.
1313

1414
We also provide ["all in one setup check"](./installation-instructions.html#setup-check) to test everything works as expected.
1515

1616
## Command line terminal
1717

18-
You will need a command line terminal (also referred to as a shell)
19-
in order to run Python scripts and various command like tools (such as Git and tools that interact with your filesystem).
18+
You will need a unix command line terminal (also referred to as a shell)
19+
in order to run some of the code in this workshop including various commands from tools such as Git and tools that interact with your filesystem.
2020

2121
::: tab
2222

@@ -30,16 +30,7 @@ This will install the Bash command line terminal emulation and Git command line
3030
Note that the use of Windows command line terminals **Powershell** or `cmd` is not suitable for the course.
3131
We also advise against using [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/)
3232
for this course as we do not provide instructions for troubleshooting any potential issues between WSL and
33-
Visual Studio Code (VS Code).
34-
35-
The Git Bash installation presents the user with lots of configuration options - we recommend changing the following
36-
two and accepting the default values for all of the others:
37-
38-
- "Git Editor" option for Git Bash - by default this is set to **Vim**; make sure to select **VS Code** instead -
39-
if that option is available to you - otherwise accept the default option and we will help you change that later on;
40-
- "Adjusting the name of the initial branch in new repositories" option - by default this is set to "Let Git decide";
41-
make sure to select the "Override the default branch name for new repositories" option and
42-
type the name "main" in the text field.
33+
RStudio.
4334

4435
### macOS & Linux
4536

@@ -79,7 +70,7 @@ additional steps.
7970
### Windows
8071

8172
Windows users *will have to* use **Git Bash** - as explained in the
82-
[command line terminal installation section](index.html#command-line-tool).
73+
[command line terminal installation section](index.html#command-line-terminal).
8374

8475
### macOS & Linux
8576

@@ -254,124 +245,47 @@ You may be asked to add GitHub to the list of trusted hosts on your machine (say
254245
Hi anenadic! You've successfully authenticated, but GitHub does not provide shell access.
255246
```
256247

257-
## Python 3 distribution
258-
259-
You will need Python 3 for this course (note that while Python 2 may work as well, it is not supported by this course).
260-
You may already have Python 3 installed on your system, in which case you do not have to do anything.
248+
## R
261249

262-
To download the latest Python distribution for your operating system,
263-
please head to [Python.org](https://www.python.org/downloads/).
264-
Then use an appropriate command for your platform (see below) to test your installation.
250+
You will need the statistical programming language R for this course.
251+
You may already have R installed on your system, in which case you do not have to do anything.
265252

266-
Windows users should make sure to tick the "Add python.exe to PATH" check box at the bottom of the first page of the installer wizard to make sure that Python executable is found after installation.
253+
To download the latest R distribution for your operating system,
254+
please head to [cran](https://cran.rstudio.com/).
267255

268-
### Testing Python 3
256+
### Testing R
269257

270-
You can check that you have Python 3 installed correctly from the command line terminal using the command below.
258+
You can check that you have R installed correctly from the command line terminal using the command below.
271259

272260
```bash
273-
$ python3 --version # on macOS/Linux
274-
$ python --version # on Windows — Windows installation comes with a python.exe file rather than a python3.exe file
261+
$ Rscript --version # on macOS/Linux
275262
```
276263

277264
You should see something like the output below.
278265

279266
```output
280-
Python 3.11.7
267+
Rscript (R) version 4.5.2 (2025-10-31)
281268
```
282269

283-
::: callout
284-
285-
If you are using Windows and invoking `python` command causes your Git Bash terminal to hang with no error message
286-
or output, you may need to create an alias for the Python executable `python.exe` like so:
287-
288-
```bash
289-
$ alias python="winpty python.exe"
290-
```
291-
This alias will be valid for the duration of the shell session. For a more permanent solution, from the shell do:
292270

293-
```bash
294-
$ echo "alias python='winpty python.exe'" >> ~/.bashrc
295-
```
296-
:::
271+
## RStudio
297272

273+
We will use Posit's [RStudio](https://posit.co/download/rstudio-desktop/) as an Integrated Development Environment (IDE) to type and execute R code and run command line terminal and Git commands.
298274

299-
## Visual Studio Code
275+
Please make sure to [download RStudio](https://posit.co/download/rstudio-desktop/) for your platform.
300276

301-
We will use Microsoft [Visual Studio Code (VS Code)](https://code.visualstudio.com/) as an Integrated Development Environment (IDE) to type and execute Python code and run command line terminal and Git commands (through its integrations with the tools we have installed separately so far).
277+
### Windows - Set RStudio to use gitBash Terminal
302278

303-
Please make sure to [download VS Code](https://code.visualstudio.com/Download) for your platform.
279+
1. Open RStudio once it has been installed.
280+
1. Click on the `Tools` menu and choose `Global Options…`. Then choose the `Terminal` tab.
281+
3. Under “New terminals open with”, choose Git Bash. 
282+
4. Click OK.
283+
5. Open a new terminal: Tools → Terminal → New Terminal (or use the Terminal tab). If you already have a Terminal session open, close it and open a new one—some terminal options only apply to new sessions.
304284

305-
### Extensions
306-
307-
#### Python extensions for VS Code
308-
309-
You will need to install the **Microsoft Python extension for Visual Studio Code** (from `View > Extensions` top-level menu), which provides support for Python language.
310-
311-
This extension will automatically install the following extensions too by default to provide the best Python development experience in VS Code:
312-
313-
* Pylance – performant Python language support (IntelliSense)
314-
* Python Debugger – improved debugging experience
315-
316-
![*Python extension for VS Code by Microsoft*](fig/vscode-python-extension.png){alt="Screenshot of Extension Marketplace View in VS Code showing the search results for the term 'python'
317-
in the search result list on the left with the 'Python by Microsoft' extension selected and details of this extension showing in the pane on the right with a button to
318-
install it" .image-with-shadow }
319-
320-
#### Command line terminal & Git integration in VS Code
321-
322-
::: tab
323-
324-
### Linux/macOS
325-
On macOS and Linux systems, VS Code will typically recognise a command line terminal you already have on your system (along with all programs/commands such as Git you can run from it).
326-
You do not have to install or configure anything additionally - it will be available as a "Terminal" in VS Code.
327-
328-
### Windows
329-
On Windows, if VS Code does not automatically recognise Git Bash as a command line terminal to be used as a "Terminal", installing VS Code extension "Start git-bash" should help.
330-
To view available and installed extensions, go to `View > Extensions` from the top-level menu.
331-
332-
![*Git Bash extension for VS Code*](fig/vscode-gitbash-extension.png){alt="Screenshot of Extension Marketplace View in VS Code showing the 'Start git-bash'
333-
extension selected in the search result list on the left and the extension details in the pane on the right with a button to install it" .image-with-shadow }
334-
335-
To check the command line integration and that VS Code knows about different command line terminal(s) installed on your system select "Terminal -> New Terminal" from the top level menu.
336-
This should open a terminal window within VS Code.
337-
Within the terminal window, the type of the current terminal is indicated towards the right of the window (e.g. in the image below, the current command line terminal is `bash` - but note that you may have different terminal types installed on your machine).
338-
This can be changed (provided you have several command line terminal programmes installed on your machine) by clicking the "+" drop-down menu button next to the command line terminal indicator.
339-
Windows users may have"Powershell" selected by default here - you should select "Git Bash" from the list.
340-
341-
You can also change the default command line terminal from the same drop down menu by using the option
342-
"Select Default Profile" (so it will use that one next time you open a terminal window).
343-
344-
![*Terminal window in VS Code*](fig/vscode-terminal.png){alt="Screenshot of the terminal pane in VS Code highlighting the current terminal type and dropdown menu to open a new terminal with 'Select Default Profile' option highlighted in the menu"}
345-
:::
346-
347-
#### VS Code extensions for Git (optional)
348-
349-
You can optionally install the following VS Code extensions (from `View > Extensions` top-level menu) to make your Git experience in VS Code better:
350-
351-
- GitLens - Git Supercharged (adds a few nice additions to Git support in VS Code)
352-
- Git Graph (provides nice graphs and visualisations of a Git repository in VS Code)
353-
354-
![*GitLens and Git Graph extensions for VS Code*](fig/vscode-git-extensions.png){alt="Screenshot of Extension Marketplace View in VS Code showing the GitLens and Git Graph
355-
extensions under installed extensions on the left with the GitLens extension selected and details of GitLens extension in the pane on the right with buttons to
356-
uninstall and disable it" .image-with-shadow }
357-
358-
While the above extension may be very useful for your future work, we will not be using them in the course as we will type Git commands from the command line.
359-
360-
#### VS Code extensions for viewing data (optional)
361-
362-
You can optionally install the following extensions for additional support for viewing and editing different data formats in VS Code:
363-
364-
- Excel Viewer - custom editor and previewer for CSV files and Excel spreadsheets
365-
- JSON - custom editor and previewer for JSON files
366-
367-
![*CSV and JSON data editor and viewer extensions for VS Code*](fig/vscode-data-viewer-extensions.png){alt="Screenshot of Extension Marketplace View in VS Code showing the CSV and JSON data editor and viewer extensions among the installed extensions on the left with the JSON extension selected and details of this extension showing in the pane on the right with buttons to uninstall and disable it" .image-with-shadow }
368-
369-
While the above extension may be very useful for your future work, we will not be using them in the course and the default support for these data formats in VS Code will be sufficient.
370285

371286
## Spacewalks data and analysis code {#spacewalks}
372287

373-
As part of the course, you may receive the `spacewalks.zip` archive from your instructors via email, which contains data and code to be used for
374-
examples and exercises throughout the course. Alternatively, you can download the [`spacewalks.zip` archive](https://github.com/carpentries-incubator/better-research-software/raw/refs/heads/main/learners/spacewalks.zip) from GitHub.
288+
You can download the [`spacewalks.zip` archive](https://github.com/carpentries-incubator/better-research-software-r/raw/refs/heads/main/learners/spacewalks.zip) from GitHub.
375289

376290
The archive contains [NASA's open data on spacewalks](https://data.nasa.gov/Raw-Data/Extra-vehicular-Activity-EVA-US-and-Russia/9kcy-zwvn/data_preview)
377291
(i.e. extravehicular activities - EVAs) undertaken by astronauts and cosmonauts from 1965 to 2013 and a Python script to analyse and plot this data.
@@ -387,33 +301,34 @@ Let's check your setup now to make sure you are ready for the rest of this cours
387301

388302
### Check your setup (5 min)
389303

390-
From a command line terminal on your operating system or within VS Code run the following commands to check you have
304+
From a command line terminal on your operating system or within RStudio run the following commands to check you have
391305
installed all the tools listed in [the Setup page](./installation-instructions.html) and that are functioning correctly.
392306

307+
From the the terminal within RStudio try the following commands.
308+
393309
Checking the command line terminal:
394310

395311
1. `$ date`
396312
2. `$ echo $SHELL`
397313
3. `$ pwd`
398314
4. `$ whoami`
399315

400-
Checking Python:
316+
Checking R:
401317

402-
5. `$ python --version`
403-
6. `$ python3 --version`
404-
7. `$ which python`
405-
8. `$ which python3`
318+
5. `$ R --version`
319+
7. `$ which R`
406320

407321
Checking Git and GitHub:
408322

409323
9. `$ git --help`
410324
10. `$ git config --list`
411325
11. `$ ssh -T git@github.com`
412326

413-
Checking VS Code:
327+
Checking R and RStudio:
328+
329+
12. Open RStudio and confirm it opens correctly.
330+
13. View the R version printed in the console pane
414331

415-
12. `$ code`
416-
13. `$ code --list-extensions --show-versions`
417332

418333
::: solution
419334

@@ -423,16 +338,13 @@ The expected out put of each command is:
423338
2. `bash` or `zsh` - this tells you what shell language you are using. In this course we show examples in Bash.
424339
3. Your "present working directory" or the folder where your shell is running
425340
4. Your username
426-
5. In this course we are using Python 3. If `python --version` gives you Python 2.x you may have two versions of Python installed on your computer and need to be careful which one you are using.
427-
6. Use this command to be certain you are using Python version 3, not 2, if you have both installed.
428-
7. The file path to where the Python version you are calling is installed.
429-
8. If you have more than one version these should be different paths, if both 5. and 6. gave the same result then 7. and 8. should match as well.
341+
5. Something like `Rscript (R) version 4.5.2 (2025-10-31)`, it might be a slightly different version but as long as it is 4.X.X+ it should be okay. It will also print a little bit more descriptive message after this.
342+
7. The file path to where the R version you are calling is installed.
430343
9. The help message explaining how to use the `git` command.
431344
10. You should have `user.name`, `user.email` and `core.editor` set in your Git configuration. Check that the editor listed is one you know how to use.
432345
11. This checks if you have set up your connection to GitHub correctly. If is says `permission denied` you may need to look at the instructions for setting up SSH keys again on the Setup page.
433-
12. This should open VS Code in your current working directory.
434-
macOS users may need to first open VS Code and [add it to the PATH](https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line).
435-
13. You should see the [extensions for VS Code you installed during setup](./installation-instructions.html#extensions) or previously.
346+
12. RStudio should open and show no errors.
347+
13. (the version should be 4.X.X, if it starts with 3 or earlier then you will need to follow the directions above to [update R and likely RStudio)](./installation-instructions.html#r).
436348

437349
:::
438350

learners/setup.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ To go through the course material on your own or at a workshop, you will need th
88

99
- [Command line terminal (shell)](installation-instructions.html#command-line-tool) (such as **Bash**, **Zsh** or **Git Bash**)
1010
- [Git version control tool](installation-instructions.html#git-version-control-tool)
11-
- [Python 3](installation-instructions.html#python-3-distribution)
12-
- [Visual Studio Code (VS Code)](installation-instructions.html#visual-studio-code) integrated development environment (IDE)
11+
- [R](installation-instructions.html#r)
12+
- [RStudio](installation-instructions.html#rstudio) integrated development environment (IDE)
1313
- [GitHub account](installation-instructions.html#github-account), and
1414
- [Spacewalks data and analysis code](installation-instructions.html#spacewalks) which we will be used for exercises in the course.
1515

0 commit comments

Comments
 (0)