2017-02-16 68 views

回答

0

你可以这样做:

which.max(data$women1990) 

要获得的行号,然后你就可以使用:

row.names(data)[which.max(data$women1990)] 

要获得该行的名称。

更多通用代码(当你不找最大的,但一定值),使用:

which(data$women1990==max(data$women1990)) # Put desired value after the == 
+1

“把所需的值”,除非你正在寻找一个数字,然后看到http://stackoverflow.com/questions/2769510/numeric-comparison-difficulty-in-r –

相关问题