Last answered:

19 Nov 2023

Posted on:

18 Nov 2023

1

Resolved: i am getting error after writing ggplot codes

 i am getting this error after writing this code and when i run the bar_chart after this the console shows object bar_chart can not be found

2 answers ( 1 marked as helpful)
Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

19 Nov 2023

1

Hi Laliba, you are missing a closing parenthesis before the "+"... There should be two closing parenthesis like this:


bar_chart <- ggplot(df_used_cars,                    

aes(x= Brand,                        

y = Cars.Listings)) +    

geom_bar(stat = "identity"))


Posted on:

19 Nov 2023

0

The geometric bar is then not included in ggplot? If there are two closing parenthesis then the ggplot is closing after aesthetics and also then there should be two opening  parenthesis after geom_bar? I am confused 

Submit an answer