从 R 中的行名中查找行号 [英] Find row number from a row name in R
本文介绍了从 R 中的行名中查找行号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 R 中找到特定行名称的行号?我找到了一些函数,可以让您找到特定矩阵值的行号,但不能从行名中找到.
How can I find the row number of a particular row name in R? I have found functions which allow you to find a row number for a particular matrix value, but not from a row name.
推荐答案
您可以使用 which
which(rownames(dat) == "theName")
这篇关于从 R 中的行名中查找行号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文