```{=html}

```r
library(learnr)
library(submitr)
library(googlesheets4)
library(gradethis)
library(CKteachR)
knitr::opts_chunk$set(echo = FALSE)
learnr::tutorial_options(
  exercise.timelimit = 60, 
  exercise.checker = 
  gradethis::grade_learnr)
submitr::login_controls()
options(tutorial.storage = "none")

out <-
  setup_progress_monitoring(
    rstudioapi::getActiveProject(),
    "PHDL1_week1",
    "15oXGGq0fgFL7kN3ZCcouhJhnIY_wJCDj3tPu6nyug-g",
    "1niWt2nCC3cgKtMEpowFVTTlVHBCbVpJl1WK-uR4r6BU", # week 1 spreadsheet
    "UoL.MPH.datalab@gmail.com"
  )

submitr::shiny_logic(input, output, session, out$vfun, out$storage_actions)

Getting ready to use R

Preamble

What is R?

Derives from a proprietary software package called 'S-Plus'

Why use R?

Objectives

The primary objective is for you to be able to apply statistical functions available in R to your own data.

To achieve this you should be able to:

How to install R?

By now you you should all have received installation instructions. You can also download them from the links below.

R console

R looks like this. You type commands, you press enter, and R executes the commands.

R on Windows 10{width=70%}

RStudio

RStudio is an integrated development environment (IDE) for R. That means that RStudio makes the experience working with R more comfortable and speeds-up the development time of R projects. So, one could use R without RStudio (or any other IDE) and achieve the same results. Still, most likely, the work would be more time-consuming and less enjoyable.

We will deep into Rstudio in the coming weeks.

Why use R?

question("Why use R? (Select ALL that apply)",
  answer("Allows reproducible research", correct = TRUE),
  answer("Free & open-source", correct = TRUE),
  answer("State of the art statistical methods", correct = TRUE),
  answer("To complicate our lifes", message = "It may feel that is too complicated in the beginning, but eventually the experience becomes smoother."),
  incorrect = "Incorrect. We use R because it offers state of the art statistical methods, it is free, and allows reproducible research.",
  allow_retry = TRUE,
  random_answer_order = TRUE
)

Getting help with R

Access to R documentation

Search the internet for R topics



ChristK/CKteachR documentation built on Dec. 31, 2020, 10:59 a.m.