16  Ops for the extraction

16.1 First time: preparing a PC

16.1.1 Installing the software

First, you have to install these programs if they are not present yet:

  1. R: link to download R for Windows
  2. RStudio link to download RStudio
  3. Git link to download Git

For all three programs, you can accept the default options in the installation, but for Git, you may want to select that you use Notepad (or Notepad++ if you have it) as the default editor instead of Vim; and you may want to select “main” as default branch name instead of “master”.

16.1.2 Installing the R packages

Once you installed the software, start RStudio and start installing a series of R packages. To do that, run these commands by copying them and pasting them in the console in RStudio:

install.packages(c('remotes', 'here', 'markdown', 'commonmark'),
                 repos='http://cran.rstudio.com');
install.packages(c('ufs', 'ggplot2', 'DiagrammeR', 'DiagrammeRsvg'),
                 repos='http://cran.rstudio.com');
install.packages(c('yum', 'synthesisr', 'preregr', 'rock'),
                 repos='http://cran.rstudio.com');
ufs::quietGitLabUpdate("r-packages/metabefor", quiet = FALSE);

The last of these installs the {metabefor} package from its Git repository. Once {metabefor} is on CRAN, you can install from there using install.packages().

16.1.3 Cloning the repository

Cloning means that you copy a Git repository to your local PC. This will download all files in the project, along with the metadata needed to pull from and push to the server (e.g., a GitLab or Codeberg server).

In your browser, navigate to the URL of the Git repository (e.g., the URL of the NITRO repository). There, click the “Clone” button.

In RStudio, klik links bovenin op “File” en dan “New Project”

Kies “Version Control” en dan “Git”

Copy-paste de URL

Druk op Tab; hiermee gaat de cursor naar het volgende veld waar de directorynaam wordt gespecificeerd. Als het goed is “autovult” hij die met de naam van het repository (in bovenstaand voorbeeld, “verlicht-scoping-review-1”)

Kies in het derde veld een plaats om die directory aan te maken en het project naartoe te ‘clonen’. Neem bij voorkeur een lokale directory, dus niet een subdirectory van een directory van een cloud-dienst (e.g. OneDrive, DropBox, etc). Bij de OU zijn de Documenten directory en de Desktop wel subdirectories van een synchronisatiedienst (met de OU server), dus als je op een OU laptop zit, kies dan een directory op de D-drive. R opent nu je project.

16.2 For every source

Elke keer Open RStudio Die opent dan op het project Navigeer in het File paneel rechts onderin naar de “extraction-Rxs-spec” directory Open het .Rmd bestand Klik in het menu helemaal bovenin “file” en dan “save as” Navigeer naar de “extraction” directory Geef als bestandsnaam op: Achternaam Eerste auteur Underscore Jaartal Underscore sourceId (shortdoi of QURID) Underscore Extractor identifier Dit wordt dan bijvoorbeeld “batty_2020_j58m_fm2.rxs.Rmd” Push naar git met: git pull; git add . ; git commit -m “Commit boodschap” ; git push