-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.Rmd
67 lines (53 loc) · 3 KB
/
index.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
---
title: "Game play and well-being | Online analysis supplement"
author: "Matti Vuorre, Niklas Johannes, Kristoffer Magnusson, & Andy Przybylski"
date: "`r Sys.Date()`"
site: bookdown::bookdown_site
output: bookdown::bs4_book
url: https://digital-wellbeing.github.io/gametime-longitudinal
cover-image: Figures/cover.png
description: |
Online analysis supplement for "Time spent playing video games is unlikely to impact well-being (Vuorre, Johannes, Magnusson, & Przybylski, 2021)"
biblio-style: apalike
---
# Introduction
This repository ([GitHub](https://github.com/digital-wellbeing/gametime-longitudinal) / [OSF](https://osf.io/fb38n/)) contains the data and code required to reproduce all analyses reported in our manuscript, *Time spent playing video games is unlikely to impact well-being* (Vuorre, Johannes, Magnusson, & Przybylski, 2021). These analyses are presented in the [Online analysis supplement](https://digital-wellbeing.github.io/gametime-longitudinal).
## Materials
- [Preprint](https://psyarxiv.com/8cxyh)
- A publicly available version of our manuscript in advance of peer-review and formal publication
- [GitHub repository](https://github.com/digital-wellbeing/gametime-longitudinal)
- A version controlled repository containing all the raw data and code in this project
- [OSF repository](https://osf.io/fb38n/)
- An archived permanent copy of the GitHub repository
- [Online analysis supplement](https://digital-wellbeing.github.io/gametime-longitudinal)
- The output document of our analyses
- [![DOI](https://zenodo.org/badge/373533911.svg)](https://zenodo.org/badge/latestdoi/373533911)
- Zenodo archive
In addition to raw data, the repository contains many survey and telemetry variables that we did not analyse, but that may be of interest to further analyses of gameplay and well being.
## Reproducibility
The raw data are in the `Data/` directory of this repository. The code that we used to clean and analyse the data are organised in R Markdown (`.Rmd`) files in this directory, which are meant to be run in the sequence indicated by their numeric prefixes. To run all the cleaning and analyses, and compile the resulting document ([the online analysis supplement](https://digital-wellbeing.github.io/gametime-longitudinal)), run `bookdown::render_book()` in R or click "Build Book" in the RStudio IDE.
### Docker
To ensure the reproducibility of our analyses, you can use Docker:
Build the Docker image
```
docker build \
--build-arg R_VERSION=4.1.1 \
--build-arg RENV_VERSION=0.14.0 \
-t gametime-longitudinal .
```
Run the container and render output. Note you may adjust `MAX_CORES` to use more cores to speed up computations.
```
docker run \
--rm \
-v "$(pwd):/home/" \
-v "/home/renv/library" \
-e MAX_CORES=1 \
gametime-longitudinal \
R -e 'renv::restore(prompt = FALSE); bookdown::render_book()'
```
```{r additional-packages, include = FALSE}
# These packages loaded here to ensure they are added to renv
library(downlit)
library(Hmisc)
library(ragg)
```