Consider a data frame with custom row names:
> data <- data.frame(a=1:3,b=2:4,c=3:5,row.names=c(\"x\",\"y\",\"z\")) > data a b c x 1 2 3 y 2 3 4 z 3 4
An even easier way is data['c'], which will result in the same output:
data['c']
c x 3 y 4 z 5