I'm trying to create a beeswarm plot in R with my specific dataset. I am not an R expert. My data looks like this:
group p1 p2 p3 p4
A .01 .1 n/a 1.9
A 2.0 n/a n/a .05
A n/a n/a n/a .3
B .05 .1 1.0 .5
B 1.0 .02 .054 .01
B .05 n/a 3.1 .8
What I would like to see is the beeswarm plot with columns that are p1, p2, p3 and p4, and for each column it displays the different groups, colored by the distinct groups (red for 'A' and blue for 'B' for example). On the y axis I would like to see the actual data points/measurements.
I can separate out the data by groups as well if that makes it easier- so there would be one table for 'A' and one table for 'B' that I could overlap on the same plot.
I just don't know how to make the columns corrrespond to p1, p2, etc. and overlay the different measurements in a column given my input data.