diff --git a/book/_bookdown_files/11-resilience1_files/figure-html/unnamed-chunk-18-1.png b/book/_bookdown_files/11-resilience1_files/figure-html/unnamed-chunk-18-1.png
index 331f5f2..e553337 100644
Binary files a/book/_bookdown_files/11-resilience1_files/figure-html/unnamed-chunk-18-1.png and b/book/_bookdown_files/11-resilience1_files/figure-html/unnamed-chunk-18-1.png differ
diff --git a/book/_bookdown_files/13-probability-1_files/figure-html/unnamed-chunk-2-1.png b/book/_bookdown_files/13-probability-1_files/figure-html/unnamed-chunk-2-1.png
index 3760aa0..51d539c 100644
Binary files a/book/_bookdown_files/13-probability-1_files/figure-html/unnamed-chunk-2-1.png and b/book/_bookdown_files/13-probability-1_files/figure-html/unnamed-chunk-2-1.png differ
diff --git a/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-1-1.png b/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-1-1.png
index 27ac7cb..1156217 100644
Binary files a/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-1-1.png and b/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-1-1.png differ
diff --git a/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-4-1.png b/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-4-1.png
index 224d0ee..a8ba914 100644
Binary files a/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-4-1.png and b/book/_bookdown_files/14-probability-2_files/figure-html/unnamed-chunk-4-1.png differ
diff --git a/book/_bookdown_files/15-simulation_files/figure-html/data10Khist-1.png b/book/_bookdown_files/15-simulation_files/figure-html/data10Khist-1.png
index 5d4061e..e4dc508 100644
Binary files a/book/_bookdown_files/15-simulation_files/figure-html/data10Khist-1.png and b/book/_bookdown_files/15-simulation_files/figure-html/data10Khist-1.png differ
diff --git a/book/_bookdown_files/15-simulation_files/figure-html/data50hist-1.png b/book/_bookdown_files/15-simulation_files/figure-html/data50hist-1.png
index bd77b2e..f1e8aab 100644
Binary files a/book/_bookdown_files/15-simulation_files/figure-html/data50hist-1.png and b/book/_bookdown_files/15-simulation_files/figure-html/data50hist-1.png differ
diff --git a/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-3-1.png b/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-3-1.png
index cafae2f..fd6d706 100644
Binary files a/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-3-1.png and b/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-3-1.png differ
diff --git a/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-9-1.png b/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-9-1.png
index 2116b7f..cf2c922 100644
Binary files a/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-9-1.png and b/book/_bookdown_files/15-simulation_files/figure-html/unnamed-chunk-9-1.png differ
diff --git a/book/appendix-y-license.Rmd b/book/appendix-y-license.Rmd
index 9ce35de..26d47dc 100644
--- a/book/appendix-y-license.Rmd
+++ b/book/appendix-y-license.Rmd
@@ -1,7 +1,15 @@
-# License {-}
+# Using our materials {-}
+
+
+All PsyTeachR resources are open-access with Creative Commons licences (see below). You are free to reuse, remix, and adapt our materials with attribution. If you do use any of our work, please complete this [short form](https://forms.office.com/e/v8Sk0UpP6Q) so that we can track our impact.
+
+## Licence
This book is licensed under Creative Commons Attribution-ShareAlike 4.0 International License [(CC-BY-SA 4.0)](https://creativecommons.org/licenses/by-sa/4.0/){target="_blank"}. You are free to share and adapt this book. You must give appropriate credit [@psyteachr-template], provide a link to the license, and indicate if changes were made. If you adapt the material, you must distribute your contributions under the same license as the original.
+
+
+
diff --git a/book/packages.bib b/book/packages.bib
index dd14b25..f9fe08b 100644
--- a/book/packages.bib
+++ b/book/packages.bib
@@ -33,9 +33,9 @@ @Manual{R-forcats
@Manual{R-ggplot2,
title = {ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics},
- author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo and Hiroaki Yutani and Dewey Dunnington},
- year = {2023},
- note = {R package version 3.4.2},
+ author = {Hadley Wickham and Winston Chang and Lionel Henry and Thomas Lin Pedersen and Kohske Takahashi and Claus Wilke and Kara Woo and Hiroaki Yutani and Dewey Dunnington and Teun {van den Brand}},
+ year = {2024},
+ note = {R package version 3.5.1},
url = {https://CRAN.R-project.org/package=ggplot2},
}
@@ -51,7 +51,7 @@ @Manual{R-lubridate
title = {lubridate: Make Dealing with Dates a Little Easier},
author = {Vitalie Spinu and Garrett Grolemund and Hadley Wickham},
year = {2023},
- note = {R package version 1.9.2},
+ note = {R package version 1.9.3},
url = {https://CRAN.R-project.org/package=lubridate},
}
diff --git a/book/template.rds b/book/template.rds
index 1351bf9..b76df7d 100644
Binary files a/book/template.rds and b/book/template.rds differ
diff --git a/docs/01-intro.md b/docs/01-intro.md
index 1b91cd4..c872b39 100644
--- a/docs/01-intro.md
+++ b/docs/01-intro.md
@@ -265,7 +265,7 @@ My name is `r name` and I am `r age` years old. It is `r birthday - today` days
As if by magic, that slightly odd bit of text you copied and pasted now appears as a normal sentence with the values pulled in from the objects you created.
-**My name is Emily and I am 39 years old. It is 273 days until my birthday.**
+**My name is Emily and I am 39 years old. It is 267 days until my birthday.**
We're not going to use this function too often in the rest of the course but hopefully you can see just how useful this would be when writing up a report with lots of numbers. R Markdown is an incredibly powerful and flexible format - this book was written using it!
@@ -295,6 +295,35 @@ The key thing we want you to take away from this chapter is that R isn't scary.
The glossary at the end of each chapter defines common jargon you might encounter while learning R. This specialised vocabulary can help you to communicate more efficiently and to search for solutions to problems. The terms below link to our [PsyTeachR glossary](https://psyteachr.github.io/glossary/), which contains further information and examples.
-|term |definition | |:---------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------| |character |A data type representing strings of text. | |IDE |Integrated Development Environment: a program that serves as a text editor, file manager, and provides functions to help you read and write code. RStudio is an IDE for R. | |numeric |A data type representing a real decimal number or integer. | |object |A word that identifies and stores the value of some data for later use. | |panes |RStudio is arranged with four window "panes". |
+
+
+
+
term
+
definition
+
+
+
+
+
character
+
A data type representing strings of text.
+
+
+
IDE
+
Integrated Development Environment: a program that serves as a text editor, file manager, and provides functions to help you read and write code. RStudio is an IDE for R.
+
+
+
numeric
+
A data type representing a real decimal number or integer.
+
+
+
object
+
A word that identifies and stores the value of some data for later use.
+
+
+
panes
+
RStudio is arranged with four window "panes".
+
+
+
diff --git a/docs/02-stroop.md b/docs/02-stroop.md
index bbdabf8..88f4f93 100644
--- a/docs/02-stroop.md
+++ b/docs/02-stroop.md
@@ -204,7 +204,7 @@ library(cowsay)
```
```
-## Warning: package 'cowsay' was built under R version 4.3.1
+## Warning: package 'cowsay' was built under R version 4.3.3
```
You'll see `library(cowsay)` appear in the console. There's no warning messages or errors so it looks like it has loaded successfully.
diff --git a/docs/09-big5.md b/docs/09-big5.md
index b2671c1..ee3c95e 100644
--- a/docs/09-big5.md
+++ b/docs/09-big5.md
@@ -30,14 +30,14 @@ For the next set of chapters we're going to use data from the most popular model
1. The trait 'Agreeableness' in the Big Five personality model refers to:
-
+
2. In the context of the Big Five Personality model, which trait might be associated with a person who is diligent, efficient, and follows a schedule?
-
+
@@ -51,7 +51,7 @@ For the next set of chapters we're going to use data from the most popular model
5. Which of these traits in the Big Five Personality model is most closely associated with creativity and a preference for novelty?
-
+
diff --git a/docs/11-resilience1_files/figure-html/unnamed-chunk-18-1.png b/docs/11-resilience1_files/figure-html/unnamed-chunk-18-1.png
index 331f5f2..e553337 100644
Binary files a/docs/11-resilience1_files/figure-html/unnamed-chunk-18-1.png and b/docs/11-resilience1_files/figure-html/unnamed-chunk-18-1.png differ
diff --git a/docs/13-probability-1.md b/docs/13-probability-1.md
index 1c1324e..5ecf4a0 100644
--- a/docs/13-probability-1.md
+++ b/docs/13-probability-1.md
@@ -47,10 +47,10 @@ How you tackle probability depends on the type of data/variables you are working
What types of data are the below measurements?
-* Time taken to run a marathon (in seconds):
-* Finishing position in marathon (e.g. 1st, 2nd, 3rd):
-* Which Sesame Street character a runner was dressed as:
-* Temperature of a runner dressed in a cookie monster outfit (in degrees Celsius):
+* Time taken to run a marathon (in seconds):
+* Finishing position in marathon (e.g. 1st, 2nd, 3rd):
+* Which Sesame Street character a runner was dressed as:
+* Temperature of a runner dressed in a cookie monster outfit (in degrees Celsius):
## Probability distributions
@@ -131,9 +131,9 @@ As with any probabilities, real-world data will come close to the normal distrib
Complete the sentences so that they are correct.
-* In a normal distribution, the mean, median, and mode .
-* In a normal distribution, the further away from the mean an observation is .
-* Whereas the binomial distribution is based on situations in which there are two possible outcomes, the normal distribution is based on situations in which the data .
+* In a normal distribution, the mean, median, and mode .
+* In a normal distribution, the further away from the mean an observation is .
+* Whereas the binomial distribution is based on situations in which there are two possible outcomes, the normal distribution is based on situations in which the data .
## Activity 4: Distribution test
diff --git a/docs/13-probability-1_files/figure-html/unnamed-chunk-2-1.png b/docs/13-probability-1_files/figure-html/unnamed-chunk-2-1.png
index 3760aa0..51d539c 100644
Binary files a/docs/13-probability-1_files/figure-html/unnamed-chunk-2-1.png and b/docs/13-probability-1_files/figure-html/unnamed-chunk-2-1.png differ
diff --git a/docs/14-probability-2_files/figure-html/unnamed-chunk-1-1.png b/docs/14-probability-2_files/figure-html/unnamed-chunk-1-1.png
index 27ac7cb..1156217 100644
Binary files a/docs/14-probability-2_files/figure-html/unnamed-chunk-1-1.png and b/docs/14-probability-2_files/figure-html/unnamed-chunk-1-1.png differ
diff --git a/docs/14-probability-2_files/figure-html/unnamed-chunk-4-1.png b/docs/14-probability-2_files/figure-html/unnamed-chunk-4-1.png
index 224d0ee..a8ba914 100644
Binary files a/docs/14-probability-2_files/figure-html/unnamed-chunk-4-1.png and b/docs/14-probability-2_files/figure-html/unnamed-chunk-4-1.png differ
diff --git a/docs/15-simulation.md b/docs/15-simulation.md
index 9c49edf..68b3893 100644
--- a/docs/15-simulation.md
+++ b/docs/15-simulation.md
@@ -35,7 +35,7 @@ sample(x = c("HEADS", "TAILS"), size = 4, replace = TRUE)
```
```
-## [1] "HEADS" "HEADS" "HEADS" "TAILS"
+## [1] "HEADS" "TAILS" "HEADS" "HEADS"
```
How many heads did you get? Don't worry if it's different to our example. Run the code again. How many heads did you get this time? How many do you get on each turn if you run the code five more times?
@@ -53,7 +53,7 @@ sample(x = 0:1, size = 4, replace = TRUE)
```
```
-## [1] 1 0 1 1
+## [1] 1 0 1 0
```
## Activity 3: `sum()`
@@ -70,7 +70,7 @@ sample(x = 0:1, size = 4, replace = TRUE) %>% sum()
```
```
-## [1] 3
+## [1] 1
```
Run this function multiple times (you can use the green markdown play arrow at the top right of the code chunk to make this easy). In our simulation of five sets of four flips we got 1, 3, 2, 2, and 3 heads. So in only one out of the five simulations did we get exactly one heads, i.e., a proportion of .2 or 20% of the time.
@@ -90,7 +90,7 @@ replicate(n = 20, expr = sample(0:1, 4, TRUE) %>% sum())
```
```
-## [1] 2 2 2 2 3 1 1 3 1 3 2 2 2 3 4 2 3 1 1 1
+## [1] 2 2 0 2 3 1 2 2 1 2 1 2 1 4 1 2 2 3 2 1
```
@@ -110,8 +110,8 @@ heads50
```
```
-## [1] 3 3 3 4 1 1 3 2 1 1 0 1 2 2 2 1 3 1 2 1 4 1 1 0 3 1 2 3 2 3 1 2 1 3 2 1 3 2
-## [39] 2 1 1 2 3 2 1 2 3 1 2 2
+## [1] 0 2 2 1 2 3 2 1 2 3 4 3 3 2 2 4 2 1 3 3 2 2 2 0 4 0 2 0 4 4 2 2 4 2 3 2 4 3
+## [39] 3 1 2 2 1 3 3 2 1 1 2 2
```
## Activity 6: probability
@@ -129,11 +129,11 @@ data50 <- tibble(heads = heads50) %>% # convert to a table
| heads| n| p|
|-----:|--:|----:|
-| 0| 2| 0.04|
-| 1| 18| 0.36|
-| 2| 16| 0.32|
-| 3| 12| 0.24|
-| 4| 2| 0.04|
+| 0| 4| 0.08|
+| 1| 7| 0.14|
+| 2| 21| 0.42|
+| 3| 11| 0.22|
+| 4| 7| 0.14|
Your numbers may be slightly different to the ones presented in this book - remember that by default, each time you run a simulation, you will get a different random sample.
@@ -213,7 +213,7 @@ data10K %>%
| p2|
|------:|
-| 0.6872|
+| 0.6896|
@@ -245,8 +245,8 @@ sd(normal)
```
```
-## [1] 10.08731
-## [1] 2.427028
+## [1] 10.11161
+## [1] 2.224537
```
Finally, you can visualise your data with a density plot. Try changing the number of data points generated by `rnorm()` from 50 to 500 to 5000 and then see how the shape of the distribution changes.
diff --git a/docs/15-simulation_files/figure-html/data10Khist-1.png b/docs/15-simulation_files/figure-html/data10Khist-1.png
index 5d4061e..e4dc508 100644
Binary files a/docs/15-simulation_files/figure-html/data10Khist-1.png and b/docs/15-simulation_files/figure-html/data10Khist-1.png differ
diff --git a/docs/15-simulation_files/figure-html/data50hist-1.png b/docs/15-simulation_files/figure-html/data50hist-1.png
index bd77b2e..f1e8aab 100644
Binary files a/docs/15-simulation_files/figure-html/data50hist-1.png and b/docs/15-simulation_files/figure-html/data50hist-1.png differ
diff --git a/docs/15-simulation_files/figure-html/unnamed-chunk-3-1.png b/docs/15-simulation_files/figure-html/unnamed-chunk-3-1.png
index cafae2f..fd6d706 100644
Binary files a/docs/15-simulation_files/figure-html/unnamed-chunk-3-1.png and b/docs/15-simulation_files/figure-html/unnamed-chunk-3-1.png differ
diff --git a/docs/15-simulation_files/figure-html/unnamed-chunk-9-1.png b/docs/15-simulation_files/figure-html/unnamed-chunk-9-1.png
index 2116b7f..cf2c922 100644
Binary files a/docs/15-simulation_files/figure-html/unnamed-chunk-9-1.png and b/docs/15-simulation_files/figure-html/unnamed-chunk-9-1.png differ
diff --git a/docs/404.html b/docs/404.html
index e8d5279..ab269b1 100644
--- a/docs/404.html
+++ b/docs/404.html
@@ -19,7 +19,7 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+