I have a csv dataset which has labelled males and females as integers (1 and 2 respectively). I'm struggling to convert these numbers into discrete categories rather than continuous integers in order for my violin plot to display two separate plots for males and females rather than a single plot with 1, 1.25, 1.5 etc.. on the x axis.
I also need to layer a box plot on top of both these violin plots, and I'm not so sure how to do this either. I'm using ggplot2
I'm sure it's a simple-ish solution but I'm new to R so could use some help.