Last answered:

15 Nov 2021

Posted on:

13 Nov 2021

2

geom_text not working on my pie chart in R

I ran the code
pe_chart <- pie_chart + geom_text(aes(label = percentages),
                                                        position = position_stack(vjust = 0.5))





all previous codes, defining this code ran fine, however when i tried to run this it returned an error and says aesthetics :: label needs to be defined for geom_text.
What am i doing wrong?

1 answers ( 0 marked as helpful)
Instructor
Posted on:

15 Nov 2021

0

Hi Anika,
thanks for reaching out! From the code you've shared, the only mistake I see is a typo in the first pie_chart(it's missing an "i"). If that's not the issue, could you please share a screenshot of your entire pie_chart code, to check if there's an error in some other part of the code? Thank you!

Best,
365 Eli

Submit an answer