-
Notifications
You must be signed in to change notification settings - Fork 0
/
how-to-use.qmd
97 lines (59 loc) · 3.24 KB
/
how-to-use.qmd
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
91
92
93
94
95
96
97
---
title: "How to use this website?"
listing:
id: intro-listings
image-align: right
contents: intro
sort: "title asc"
type: default
categories: false
sort-ui: false
filter-ui: false
page-layout: full
title-block-banner: false
---
## Labs
First, let's learn how to use the available code for `lab files`.
#### Using **Lab Files**
The `R` code in this website is executable. Each of the lab files is a `Quarto Markdwon` or `.qmd` document.
If you have background in coding and are just looking for a piece of code, or if you want to browse the code, you can access the [Labs](https://usman-afzali.github.io/PSYC344/labs.html) section and click on the relevant lab. The relevant code can be copied and ran on `R scrip`, `R markdown` or `Quarto markdown`.
If you want to access the very `.qmd` documents to use and replicate the code, you should:
1. Use the latest version of `RStudio`, at least `Version: 2022.12.0+353` or later on your computer.
2. Within `RStudio`, click on `new file` drop down menu and open a new `Quarto Document` (see the first figure), and name it.
3. Once the `.qmd` document is opened, go to the `source` tab, erase the default code and paste the code from the corresponding lab file (from line 1 up to the final line). Then hit `Render`. You will see output in the `Viewer` menu.
4. You can click `Show in a new window` to open rendered code in your local browser window (see the second figure for highlighted commands).
![RStudio Interface](r-interface.png)
![RStudio Interface 2](rstudio-interf-2.png)
::: callout-note
## Repo
`Lab files` are within the `labs` folder in [Github Repo](https://github.com/usman-afzali/PSYC344).
:::
#### Lab 1 and 2
These labs are not included as they don't involve any data analysis.
#### Lab 3: Descriptive statistics
Use the file `Lab3-Descriptive-Stats.qmd`.
#### Lab 4: EFA and CFA
Use `Lab4-EFA-and-CFA.qmd`.
#### Lab 5: *t*-test
Use `Lab5-t-test.qmd`.
::: callout-note
## More to come
Further lab files are yet to be added.
:::
## Slides
Slides are made using `revealjs` on `Quarto`. There are three ways to use them:
1. Use live: From [Presentations](https://usman-afzali.github.io/PSYC344/presentations.html), click the corresponding presentation. They can be displayed live simply by clicking on them and using the keyboard `arrow keys`.
2. Save as pdf: Get to the corresponding presentation as explained above. This option only works with `Google Chrome` as explained [here](https://quarto.org/docs/presentations/revealjs/presenting.html#print-to-pdf).
3. The `revealjs` files: The original code files on [Github Repo](https://github.com/usman-afzali/PSYC344) are inside the `presentations` folder.
The process of using them is similar as using any other `.qmd` documents explained above. Once they are opened in `RStudio`, the `Present` button from the `Presentation` tab can be used to open the presentation in the local browser - that can be presented from there.
#### Intro to Week 9
Use `Intro-to-Week9.qmd`.
#### Intro to Week 10
Use `Intro-to-Week10.qmd`.
#### Intro to Week 11
Use `Intro-to-Week11.qmd`.
#### Intro to Week 12
Use `Intro-to-Week12.qmd`.
#### Exam guidelines
Use `exam-guidelines.qmd`.
------------------------------------------------------------------------------