---
# System prepended metadata

title: COGCOMM KODNING!!

---

# COGCOMM KODNING!!


```{r}
filter(FINISHED==1) %>% 
select(CO01, PI01, PI02_01, QN01, QN02, QN03, QN04, QN05, QN06, QN07, QN08, QN09, RG01, FINISHED)
```

```{r}
df1 <- df1 %>% 
dplyr::rename("Confidence"= "CO01")
```

```{r}
# Checking how many got the different conditions
data_filtered %>% group_by(Condition) %>% 
  summarise(count = n()) %>% 
  select(Condition, count)
```

```{r}
# Adjusting the correct responses
data_filtered3["QN01"][data_filtered3["QN01"] != 2, ] <- 0
data_filtered3["QN01"][data_filtered3["QN01"] == 2, ] <- 1
```

```{r}
df2 <- df2 %>% 
mutate(df2, SUM = rowSums(df2[4:12]))

df2 <- df2[-c(1:9),]
```


```{r}
# Trying to plot the data

df$Condition <- as.factor(df$Condition)
df$Gender <- as.factor(df$Gender)

# Boxplots for the 3 conditions and their correctness
b <- ggplot(df, aes(x=Condition, y=SUM, fill = Condition))+
  geom_boxplot()+
  ggtitle("Boxplots showing the 3 conditions and amount of correct responses")

# Scatterplots for the 3 conditions and their correctness
s <- ggplot(df, aes(x=Age, y=SUM))+
  geom_point()+
  geom_smooth(method=lm)+
  ggtitle("Scatterplot showing the relation between age and amount of correct responses")

g <- ggplot(df, aes(x=Gender, y=SUM, fill = Gender))+
  geom_boxplot()+
  ggtitle("Boxplots showing the gender and amount of correct responses")

b
s
g
```