v[which.min(v)] will give you the output you listed. But if you just want the name, and not the value, then do names(v)[which.min(v)] .
確定! 回上一頁