I have a very large data set with two columns which relate as below.
df <- data.frame(
group = c("123-4", "123-4", "234-5", "234-5", "345-6", "345-6"),
age = c(38, 41, 65, 67, 78, 23))
group age
123-4 38
123-4 41
234-5 65
234-5 67
345-6 78
345-6 23
I want to be able to plot the ages for each group against each other. I can do it by pulling min and max values of each group out but I want to maintain the randomness of my xy instead of having all the min values x and all the max values y. Seems this should be very easy but I am beating head against the proverbial wall.