Suppose I have a list or data frame in R, and I would like to get the row index, how do I do that? That is, I would like to know how many rows a certain matrix consists of.
I'm interpreting your question to be about getting row numbers.
as.numeric(rownames(df))
1:nrow(df)
which()