diff --git a/CABLAB_R_online.Rmd b/CABLAB_R_online.Rmd index 3d2486e..07c650b 100644 --- a/CABLAB_R_online.Rmd +++ b/CABLAB_R_online.Rmd @@ -197,7 +197,7 @@ library(ggplot2) ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week2_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week2_exercise.R) @@ -385,7 +385,7 @@ View(df_wide) ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week3_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week3_exercise.R) @@ -558,7 +558,7 @@ df2 <- subset(df, select=c(PID, Section, Stage, Fear.rating, TOAccuracy)) ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/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 @@ -705,7 +705,7 @@ df$Year <- ifelse(df$Section == "Infirmary" | df$Section == "GhostlyGrounds", "2 ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week5_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week5_exercise.R) @@ -917,7 +917,7 @@ for (i in 1:length(x3)) { ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week6_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week6_exercise.R) @@ -1121,7 +1121,7 @@ df_long <- df_wide_exercise %>% pivot_longer( ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week7_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week7_exercise.R) @@ -1250,7 +1250,7 @@ merged_data <- merge(low.df, high.df, by=c("PID", "Section", "Stage", "Threat", ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/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 @@ -1495,7 +1495,7 @@ report(m1) ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week9_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week9_exercise.R) @@ -1534,7 +1534,7 @@ report(model2) ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week9_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week9_exercise.R) @@ -1726,7 +1726,7 @@ report(m1) ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week10_exercise.r) +[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/exercise_solutions/week10_exercise.R) @@ -1873,7 +1873,7 @@ ggplot(data = df_plot, aes(x = Condition, y = TOAccuracy, fill = Condition)) + # ``` -[Click for solution](https://github.com/steventmartinez/CABLAB-R-Workshop-Series/blob/main/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/index.html b/index.html index 8fab3c9..1606cb1 100644 --- a/index.html +++ b/index.html @@ -3049,7 +3049,7 @@

Week 2 Exercise: Installing and Loading Packages

' -

Click +

Click for solution

@@ -3275,7 +3275,7 @@

Week 3 Exercise: Working Directories

' -

Click +

Click for solution

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

Week 4 Exercise: Subsetting in R

' -

Click +

Click for solution

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

Week 5 Exercise: If Else statements

' -

Click +

Click for solution

@@ -4017,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 @@ -4180,7 +4180,7 @@

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

Click +

Click for solution

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

Week 8 Exercise: Merging data frames

' -

Click +

Click for solution

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

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

Click +

Click for solution

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

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

Click +

Click for solution

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

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

Click +

Click for solution

@@ -5072,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 @@ -5321,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