I have a tibble df
that looks like this:
id sex rating
1 43 male 10
2 44 female 8
3 45 male 7
4 46 male 3
5 47 female 5
How would I go about using ggplot2
to represent this data on a scatterplot with one dot for each id
, female ratings on the y-axis, and male ratings on the x-axis? Do I have to modify df
before using geom_point()
? Or without modifying df
, how could I set aes(x = ..., y = ...)
within geom_point()
?