It is not clear to me what your desired output is, you cant make a boxplot out of a categorical variable but considering your variable selection, maybe you want to do something like this?
JA1 <- data.frame(stringsAsFactors=FALSE,
Participant = c(1, 1, 1, 1, 1, 1),
Experiment = c(1, 1, 1, 1, 1, 1),
Question = c(1, 2, 3, 4, 5, 6),
Order = c(1, 2, 3, 4, 5, 6),
Length = c("short", "short", "long", "short", "long", "long"),
Quality = c("u", "i", "e", "a", "o", "a"),
Response = c("long", "long", "long", "short", "short", "long"),
JAcc = c("Noincorrect", "Noincorrect", "Nocorrect", "Nocorrect",
"Noincorrect", "Nocorrect"),
LengthLanguage = c("No", "No", "No", "No", "No", "No")
)
library(tidyverse)
JA1 %>%
count(Length, JAcc, name = "Prop") %>%
group_by(JAcc) %>%
mutate(Prop = Prop/sum(Prop) * 100) %>%
ggplot(aes(x=JAcc, y = Length, fill = Prop)) +
geom_tile() +
geom_text(aes(label = scales::number(Prop,
accuracy = 0.1,
suffix = "%")),
color = "white") +
scale_fill_gradient(limits = c(0, 100))
