我有一个数据。框架与列标题。
How can I get a specific row from the data.frame as a list (with the column headers as keys for the list)?
具体来说,我的数据帧是
A B C 1 5 4.25 4.5 2 3.5 4 2.5 3 3.25 4 4 4 4.25 4.5 2.25 5 1.5 4.5 3
我想得到一行相当于
> c(a=5, b=4.25, c=4.5)
a b c
5.0 4.25 4.5