-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepeatability_script_pdf.Rmd
More file actions
90 lines (77 loc) · 2.88 KB
/
Copy pathrepeatability_script_pdf.Rmd
File metadata and controls
90 lines (77 loc) · 2.88 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
title: "Gait Repeatability Study"
author: "Erik Waskiewicz"
date: "15/08/2018"
output:
pdf_document:
latex_engine: xelatex
header-includes:
- \usepackage{rotating}
- \usepackage{color}
- \usepackage[dvipsnames]{xcolor}
- \usepackage{fontspec}
- \setmainfont{Arial}
editor_options:
chunk_output_type: console
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE, message=FALSE, warning=FALSE)
## -------------------- INSTRUCTIONS ----------------------------------
# 1. Create directory for study and write file path in brackets below
setwd('<filepath>/gait-repeatability')
# 2. Move this script into new study directory
# 3. Edit title, author and date in lines 2-4 above. Do not alter any other code above.
# 4. Copy raw data into new directory named 'raw_data' within the study directory. Check that filepaths below point to the data.
study_sides = list(
c('Left', 'raw_data/<Name of file>'),
c('Right', 'raw_data/<Name of file>')
)
# 5. Change settings below, see readme for details
# 6. Once finished, save file and click knit
# ----------------------- Settings -----------------------------------
study_participants = list(
c('Participant 1', '<Participant identifier>')
)
study_assessors = list(
c('A1', '<Assessor identifier>'),
c('A2', '<Assessor identifier>'),
c('A3', '<Assessor identifier>')
)
study_sessions = list(
c('Session 1', '01'),
c('Session 2', '02'),
c('Session 3', '03'),
c('Session 4', '04')
)
study_parameters = list(
c('Foot pitch', 'Foot Pitch Angles', 'X', -80, 30, 20),
c('Foot progression', 'Foot Pitch Angles', 'Z', -25, 25, 10),
c('Ankle dorsiflexion', 'Ankle Angles', 'X', -25, 15, 5),
c('Ankle inversion', 'Ankle Angles', 'Y', 0, 30, 5),
c('Knee flexion', 'Knee Angles', 'X', -15, 70, 10),
c('Knee adduction', 'Knee Angles', 'Y', -15, 10, 5),
c('Knee rotation', 'Knee Angles', 'Z', -22, 12, 10),
c('Hip flexion', 'Hip Angles', 'X', -20, 40, 10),
c('Hip adduction', 'Hip Angles', 'Y', -15, 10, 5),
c('Hip rotation', 'Hip Angles', 'Z', -30, 10, 10),
c('Pelvic tilt', 'Pelvic Angles', 'X', 0, 20, 5),
c('Pelvic obliquity', 'Pelvic Angles', 'Y', -6, 6, 2),
c('Pelvic rotation', 'Pelvic Angles', 'Z', -10, 12, 5)
)
## Load functions - make sure this points to the repeatability functions file
source('<filepath>/repeatability_functions.R')
# --------------------------------------------------------------------
# Don't edit from here onwards!
######################################################################
dir.create('results')
```
```{r data_sorting, results='asis'}
main_summary()
sorted_data <- main_sorting(study_sides)
```
```{r main_analysis, results='asis', fig.width=9, fig.height=11.5}
grp_df <- main_analysis_latex(sorted_data, study_parameters, study_sides, study_sessions, study_assessors)
```
```{r plot_GRP, results='asis', fig.width=9, fig.height=4}
main_grp_latex(grp_df, study_assessors)
```