Get started

Here you will find useful information on how to get started with the software.

In this course we will be using R. You can either

Please let us know if you have issue accessing data files on GitHub or content on the webpage!

Option 1 (recommend): Set up your RStudio on your laptop

You will need both R and Rstudio, they are two separate things.

Tip

Watch these YouTube videos if you have trouble when trying at home.

You can download Rstudio here. In this page it will first ask you to install R.

You can download R for Linux, macOS or Windows here or here

Once you have finished installing both R and Rstudio, open Rstudio, and you should be seeing something like this:

Option 2: Use Posit Cloud

Note

It is recommended to have R and Rstudio installed on your laptop, this is because you have a better control of where you prefer to download data and course material. This is also useful when you want to analyse your own datasets. For example, you might have to upload datafiles to the server for Posit Cloud to work.

However, if there is a problem with the installation, you can use Posit Cloud as an alternative.

On Tuesday morning we will see if most people can successfully make R run on their laptop and make necessary adjustments.

Posit Cloud is free of charge for personal users. You need to sign up for a new user account and have internet connection.

Once you signed up, you can open a new workspace, and it will look like something like this. If it is the first time you use Posit Cloud, it will be empty (i.e. no script or data).

Data

The datasets used in this course are stored in this folder.

If you have trouble accessing or downloading datasets from GitHub, please let us know - we will upload a copy on Canvas.

Download data from GitHub

  1. Go to the repository, select the data you want to download by left-click the file name

  2. If it is a dataset in .csv, .txt format, you will see something like this

  • find Raw button, right-click, you will see a list of options
  • choose Download Linked File, this will download the data into your default download folder
  • alternatively, choose Download linked file as… so that you can change where you put it and file name.
  1. If it is a dataset in .dta, .xlsx or other format, you might not see the data directly:

  • find Download button, left-click, and you will download it into your default download folder.

Optional: download data via URL

If you feel like it, you can also download data inside R via URL. You can read more about it here.

Code

R scripts are stored in this folder.

To download an R script, it is similar to downloading a dataset

Alternatively, you can create your own R script locally inside Rstudio, by copy and paste the script from Github.

Books and papers

You can find these books in the library.

  • Essential medical statistics (Kirkwood and Sterne, 2nd edition, 2003) (link
  • Statistiske metoder i medisin og helsefag (Aalen, Frigessi, Moger, Scheel, Skovlund og Veierød, 2 utg, 2018) (link)

Videos

Install R and Rstudio YouTube videos