How do you subset a data frame using a variable to indicate the row number?
Xs = seq(1,10) Ys = Xs^2 df <- data.frame("X" = Xs, "Y" = Y