I\'m inside a big function I have to write. In the last part I have to calculate the mean of a column in a data frame. The name of the column I am operating on is given as a
Any of the following should work!!
df <- data.frame(x=1:3,y=4:6) mean(df$x) mean(df[,1]) mean(df[["x"]])