I have 5 variables (age, date, ahe, female, bachelor) and would like to split the data by the column 'female' which takes a value 1 for females and 0 for males. I understand the function split()
can split this for me with the code:
split(data_wage$ahe, data_wage$female)
but what I don't understand is how to use these two split groups after this part is done. I want to plot a scatter plot of 'age' on 'ahe' twice one time with the females and one time with males. Any help would be greatly appreciated!