Making Changes

Make a change to the repository

For this exercise each participant will create a single new file, setting a few parameters to values of their choice, in their fork. We will then collate everyone’s files in the original repository through pull requests.

The params/ folder is where we are going to gather our individual parameter files. Currently, it just contains a .R template file called params_tmpl.R. Please DO NOT EDIT this file. We will make a copy of this file to edit.

Let’s go ahead and create and complete these files.


Make a copy of params/params_tmpl.R

First think of a species name based on your name, eg Augustinus vourinus. This will be the species name associated with the evolutionary trajectory defined by the parameters you’re going to supply. This is both for for fun, but also to ensure that the files each participant commits have unique names.

Now, make a copy of the file and save it in the same folder (params/). Use the species name you came up with to name the file.

You can either use your operating system’s file browser (eg Finder, Files, File Explorer) to find and copy params_tmpl.R or if you like, you can do this from the command line too:

# make a copy of the template file
$ cp params/params_tmpl.R params/augustinus_vourinus.R

Edit your parameters file with values of your choice

Open the file you just created in your favourite text editor; we suggest nano if you don’t already have a favourite because it is simple and likely to be already installed. Edit the file with parameters of your choice and save.

For example, from the command line:

# Using the text editor nano
$ nano params/augustinus_vourinus.R

# or Visual Studio Code (if installed)
$ code params/augustinus_vourinus.R

The parameters each participants need to supply are:

  • sig2: A numeric value greater than 0 but smaller than 5

  • species.name: a character string e.g. "anas_krystallinus". Try to create a species name out of your name! It must be enclosed in double quotes (ie "...")

  • color: a character string e.g. "red", "#FFFFFF" (Check out the list of available colours in R). It also must be enclosed in double quotes (ie "...")

NB: remember to save the changes to your file