The values that you see are the sum of all dv
values for each iv
.
tapply(dv, iv, sum)
# x y
#114 124
Maybe one of these plots is what you want.
library(ggplot2)
library(dplyr)
chart %>%
group_by(iv) %>%
mutate(row = row_number()) %>%
ggplot(aes(x=iv, y=dv, fill = factor(row))) +
geom_col()
chart %>%
group_by(iv) %>%
mutate(row = row_number()) %>%
ggplot(aes(x=iv, y=dv, fill = factor(row))) +
geom_col(position = 'dodge')
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…