How to plot frequency of Y N data against age ranges in R

0 votes
I have a set of data with age ranges (20-29, 30-39, etc.) in one column, and I have people who answered Yes, No, Maybe, Skip. What I need is to plot the frequencies of answers for each age group.

qplot(x=AgeGroup, y=answer, colour = factor(answer), facets = ~ answer,  data = y_n, geom = "line") + guides(colour=FALSE)

This is my code so far, but I think my problem is that my 'y' input is people's answer, rather than the frequency of answers.
Apr 27, 2021 in Data Analytics by MrStickyRice

edited Mar 4, 2025 316 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP