Module 0 · Prepare your computer · step 4 of 8
0.4Open the project and check R
Commands tested on Windows
In short
We open the course project and check that R can find its files. We display the system and R version, then try a small calculation to check that commands run.
Do this
- Paste in the RStudio ConsoleThe R command in the Command section below
You should see: [1] 5
Command
R command
Type or paste into the RStudio console.
1getwd()2stopifnot(file.exists("config.R"), file.exists("R/course.R"))3Sys.info()[c("sysname", "release", "machine")]4R.version.string52 + 3- Note 1: Show the folder where R looks for files.
- Note 2: Check that the required project files exist.
- Note 3: Show the computer's system and processor information.
- Note 4: Show the installed R version.
- Note 5: Add two numbers to check that R runs commands.
You need
The complete extracted or cloned 2026 project from step 0.3, not one downloaded notebook. No branch change is needed.
What we do
Open the project, then open this notebook. Follow these actions:
- In the folder you extracted or cloned at step 0.3, double-click
GWAS_course.Rproj. RStudio opens with the project. You should usually see the project nameGWAS_courseat the top right. - In the Files pane, click the folder
notebooks. Then clickmodule_00_preparation.qmd. It opens in the editor. The filegwas_course_complete.qmdholds all modules in one notebook, if you prefer one file. The folderlessonsholds the source files for the author. You do not need it. - Run commands in the console. Always work from the project root (opens in a new tab), which is the main folder of the project.
Why
A relative path (opens in a new tab) gives the place of a file starting from the working directory. The working directory is the folder where R looks first. One project root means you never copy your personal full paths into commands.
Illustration in preparation
Illustration in preparation
Expected result
Show the expected result
R prints the path of your project folder. The file checks finish without an error. Your folder path will differ from the author's path.
R prints your system information, its version and the result [1] 5 from the small calculation. The R version may differ from the validation environment.
[1] 5
Verification: the project, version and calculation commands passed on Windows before this reordering.
If something goes wrong
If something goes wrong
If config.R is missing, close RStudio and open the project again from the extracted source folder. Do not create an empty replacement file. Do not rename a downloaded HTML page to .R.
Quick check
Does a relative path starting R/ refer to a folder on every computer's C drive?
Show the answer
No. It refers to the R folder under the current project root.
Files created
RStudio may create local project settings in .Rproj.user/. Git ignores them.