BRUG (Bergen R User Group): Wiki

(Redirected from Main Page)

Notes from the Monthly meetings

October 4, 2018: Adjusting ggplot figures to your needs (Torbjørn Torsheim)

Using these lecture slides, Torbjørn introduced how to adjust figures created with ggplot to your needs. The original Rmd-file and the CSV file could not be uploaded to the Wiki but can be found on the Code4BRUG-Git (see below).

August 7, 2018: Introduction to ggplot (Knut Helge Jensen)

The lecture notes give an overview how to create figures using ggplot and how to modify and adapt them to your needs (colors, labels, etc.).

June 4, 2018: Introduction to Bayesian statistics with R (Knut Helge Jensen)

The lecture notes give a short introduction to Bayes theorem, show the principal difference between Bayesian and frequentist statistical inference, and give an example of how to perform Bayesian analysis in R through the brms-package. This package allows the user to benefit from the merits of STAN only by using simple, lme4-like formula syntax.

We also spoke about the "Monty Hall" problem (where a game show participant can win a car after having received additional information). This can be understood as a Bayesian problem. There is a good video-lecture about the game show problem both with a Bayesian and a more intuitive solution to the question.

May 22, 2018: R procedures for meta analysis (Helge Molde)

March 1, 2018: Topic Modelling and the tm package (Rüdiger Pfister)

February 8, 2018: Text analysis - the tidytext package (Torbjørn Torsheim)

The main topic this time is text analysis. The tidytext package which nicely builds on the tidyverse principles for data management we explored last time will be presented.

December 4, 2017: Data management (Gisela Böhm & Rüdiger Pfister)

R code and code snippets on

I created a repository (Code4BRUG) where we can exchange R code on In order to get access, go to the web page, and log in with your UiB credentials. This creates an account for the git there. Afterwards you can send me a note that you would like to be added as contributor. The complete link for the repository is
After I granted you access, you can access the repository from within R studio. For this, you go to File → New project → Version control → Git and give as "Repository URL", and (optionally) choose "Code4BRUG" as "Project directory name".

Other sources of help with R

This web page provides a brief introduction regarding the use of R within psychology, including some links providing introductions into several topics (R in general, bootstrapping, Bayes, etc.).

The department of biostatistics at UiB created web pages to help you with getting into using R. The web page includes some tutorials, e.g., how to organize your data using Excel in order to use them in R later.

An introduction to the generation of tables for LaTex in R.