Find row number from a row name in R

橙三吉。 提交于 2019-12-19 09:52:53

问题


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.


回答1:


You can use which

which(rownames(dat) == "theName") 


来源:https://stackoverflow.com/questions/31437087/find-row-number-from-a-row-name-in-r

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!