I have a data.frame with column headers.
How can I get a specific row from the data.frame as a list (with the column headers as keys for the list)?
Specific
Try:
> d <- data.frame(a=1:3, b=4:6, c=7:9) > d a b c 1 1 4 7 2 2 5 8 3 3 6 9 > d[1, ] a b c 1 1 4 7 > d[1, ]['a'] a 1 1