Displaying multiple variables on one plot in R -


i have clinical data with:

type, age, sex one, 24, m two, 45, f one, 48, m . . . 

i use r show useful plots, example box plot.

i have type on x-axis , age on y-axis vertical boxes, split sex, separate male , female grouped type.

my first try is:

data_set <- read.csv("myfile.csv") x <- data_set[,'type'] y <- data_set[,'age'] plot(x,y) 

it's quite okay add titles each axis , have more values (be more acurate readers) on y-axis. , importantly, split each box two--separate male , female.