diff --git a/.DS_Store b/.DS_Store index 07e1798..dbf7cfb 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/CABLAB_R_online.Rmd b/CABLAB_R_online.Rmd index 58be404..3d2486e 100644 --- a/CABLAB_R_online.Rmd +++ b/CABLAB_R_online.Rmd @@ -197,7 +197,7 @@ library(ggplot2) ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week2_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week2_exercise.r) @@ -281,6 +281,8 @@ There were also 3 experimental conditions: Control, Share, and Test. For the first two segments (Delirium and Take 13), all participants toured the segment in the Control condition. However, in the last two segments (Crypt and Machine Shop), some participants toured the segments in the Control condition, other participants toured Machine Shop in the Share condition and Crypt in the Test condition, while other participants toured Machine Shop in the Test condition and Crypt in the Share condition. +![](images/Halloween Nights.png){width=60%} + After completing the haunted house tour, participants were assessed at two time points: immediately afterwards and again 1-week later. During the Immediate assessments, participants completed a recency discrimination task and freely recalled their memory for 1 low-threat and 1-high threat haunted house segment. During the one week-delay assessments, participants completed a recency discrimination task and freely recalled their memory for *all* haunted house segments. Check out the study design below as well as the vignette illustrating when the three experimental conditions (i.e., Control, Share, and Test) took place throughout the haunted house tour. @@ -383,7 +385,7 @@ View(df_wide) ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week3_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week3_exercise.r) @@ -556,7 +558,7 @@ df2 <- subset(df, select=c(PID, Section, Stage, Fear.rating, TOAccuracy)) ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week4_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week4_exercise.r) ## Missing data @@ -703,7 +705,7 @@ df$Year <- ifelse(df$Section == "Infirmary" | df$Section == "GhostlyGrounds", "2 ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week5_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week5_exercise.r) @@ -915,7 +917,7 @@ for (i in 1:length(x3)) { ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week6_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week6_exercise.r) @@ -1119,7 +1121,7 @@ df_long <- df_wide_exercise %>% pivot_longer( ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week7_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week7_exercise.r) @@ -1248,7 +1250,7 @@ merged_data <- merge(low.df, high.df, by=c("PID", "Section", "Stage", "Threat", ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week8_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week8_exercise.r) ## Week 8 Assignment: Merging data frames @@ -1493,7 +1495,7 @@ report(m1) ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week9_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week9_exercise.r) @@ -1532,7 +1534,7 @@ report(model2) ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week9_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week9_exercise.r) @@ -1724,7 +1726,7 @@ report(m1) ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week10_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week10_exercise.r) @@ -1871,7 +1873,7 @@ ggplot(data = df_plot, aes(x = Condition, y = TOAccuracy, fill = Condition)) + # ``` -[Click for solution](https://steventmartinez.github.io/CABLAB-R-Workshop-Series/exercise_solutions/week11_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week11_exercise.r) So we already learned how to add a plot title, an x-axis title, and a y-axis title, as well as how to change x-axis text labels and legend text labels. We can still customize additional plot aesthetics that we'll talk about below. diff --git a/images/Halloween Nights.png b/images/Halloween Nights.png new file mode 100644 index 0000000..4801c23 Binary files /dev/null and b/images/Halloween Nights.png differ diff --git a/index.html b/index.html index c4c6a7f..8fab3c9 100644 --- a/index.html +++ b/index.html @@ -3049,7 +3049,7 @@

Week 2 Exercise: Installing and Loading Packages

' -

Click +

Click for solution

@@ -3160,6 +3160,7 @@

Intro to “Fright Night” dataset

Share condition and Crypt in the Test condition, while other participants toured Machine Shop in the Test condition and Crypt in the Share condition.

+

After completing the haunted house tour, participants were assessed at two time points: immediately afterwards and again 1-week later. During the Immediate assessments, participants completed a recency @@ -3274,7 +3275,7 @@

Week 3 Exercise: Working Directories

' -

Click +

Click for solution

@@ -3696,7 +3697,7 @@

Week 4 Exercise: Subsetting in R

' -

Click +

Click for solution

@@ -3855,7 +3856,7 @@

Week 5 Exercise: If Else statements

' -

Click +

Click for solution

@@ -4016,7 +4017,7 @@

Week 6 Exercise: Intro to For Loops in R

' -

Click +

Click for solution

Next, let’s map the for loop onto the dataset we’ve been using! I’ll also try to convert the structure of the ifelse() function into the @@ -4179,7 +4180,7 @@

Week 7 Exercise: Pivoting data from wide to long and long to ' -

Click +

Click for solution

@@ -4278,7 +4279,7 @@

Week 8 Exercise: Merging data frames

' -

Click +

Click for solution

@@ -4654,7 +4655,7 @@

Week 9 Exercise: Analyzing Data w/ Categorical Independent ' -

Click +

Click for solution

@@ -4676,7 +4677,7 @@

Week 9 Assignment: Analyzing Data w/ Categorical Independent ' -

Click +

Click for solution

@@ -4968,7 +4969,7 @@

Week 10 Exercise: Analyzing Data w/ Continuous Independent ' -

Click +

Click for solution

@@ -5071,7 +5072,7 @@

Week 11 Exercise: Visualizing data: Intro to ggplot

' -

Click +

Click for solution

So we already learned how to add a plot title, an x-axis title, and a y-axis title, as well as how to change x-axis text labels and legend @@ -5320,7 +5321,7 @@

Violin plots!

#Add in the jittered points that reflect each individual participant p + geom_jitter(shape=16, position=position_jitter(0.2)) -

+

While we didn’t add too many customization to this plot, hopefully you can see why some people prefer to store plots in data objects and add in their customizations one line a time, rather than all at