line,bar graphs and table

I have to make a bar chart of the data that I have filtered and stored as values from a data frame.

group3 <-hotel_bookings %>%
group_by(hotel,country) %>%
count(hotel) %>%
count(country)

barplot(group3$n, xlab = "hotel_name", ylab = "booking_count", main = "Booking distribution" )

in there hotel_bookings is the name of the data set, hotel and country is column name.

Can someone help??

its not clear what your end result should be.
It does seem that your way of summarising the data would not give meaningful results you probably intend.

group3 <-hotel_bookings %>%
group_by(hotel,country) %>%
count()

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.