I am trying to create a plot for my stable isotope data from sequential dentine sampling which provides deltaN15 and deltaC13 data as well as age assignments. I would like to have the x-axis be the age of the sample (i.e. 8 years old - 17 years old) while one y-axis would show the dN15 and the other the dC13 values. It would be two separate lines for each isotope and I know this can be done (I've seen it in papers). I know that in many cases having multiple y-axes is not preferred but this is an important indicator of health and famine when dealing with sequential dentine data.
I have tried the following code from a previous question, but it did not work:
par(mar = c(5, 4, 4, 4) + 0.3) # Leave space for z axis plot(df.OBF031$age, df.OBF031$δ..N) # first plot par(new = TRUE) plot(df.OBF031$age, df.OBF031$δ..C, type = "l", axes = FALSE, bty = "n", xlab = "", ylab = "") axis(side=4, at = pretty(range(df.OBF031$δ..C))) mtext("z", side=4, line=3) I have attached a picture of what I am hoping to create that my supervisor made in Excel.
Example of sequential dentine plot

This is the data from one of the individuals (each individual will get their own plot)
