Hey everyone,
I am about to create a piechart with this code:
x %>%
ggplot(x, aes(x=1, y=Freq, fill=factor(korpus1))) +
geom_col(position = 'stack', width = 1) +
geom_text(aes(label = paste(round(Freq / sum(Freq) * 100, 1), "%"),
x = 1.3),
position = position_stack(vjust = 0.5)) +
theme_classic() +
theme(aes(plot.title = element_text(hjust=0.5)),
axis.line = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank()) +
labs(aes(fill = "korpus1",
x = NULL,
y = NULL,
title = "Tortendiagramm")) +
coord_polar("y")
an R just keeps telling me that "Mapping should be created with aes()
or aes_()
" and I really do not see what I did wrong. I really hope that someone can help me. Thank you!!