Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Find row number from a row name in R

Tags:

r

rows

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.

like image 503
user507 Avatar asked Jul 15 '15 17:07

user507


1 Answers

You can use which

which(rownames(dat) == "theName") 
like image 86
Rorschach Avatar answered Oct 10 '22 17:10

Rorschach