I'm new to R. when writing:
ggplot(data = df, aes(x="", y = percentage, fill = Payment.Type)) +
geom_col(color = "black") +
coord_polar("y", start =0) +
geom_text(aes(label1 = paste0(round(percentage*100), "%")),
position = position_stack(vjust = 0.5)) +
theme(panel.background = element_blank(),
axis.line = element_blank(),
axis.text = element_blank(),
axis.ticks = element_blank(),
axis.title = element_blank(),
plot.title = element_text(hjust = 0.5, size = 18)) +
ggtitle("pie chart") +
scale_fill_manual(values = colors)
I got a warning message :
Error: geom_text requires the following missing aesthetics: label
Run rlang::last_error()
to see where the error occurred.
In addition: Warning message:
Ignoring unknown aesthetics: label1
What should I do to fix that problem? Thank you