nrow() Function in R
nrow()
function in R Language is used to get the row number of a matrix.
Syntax:
row(x, as.factor=FALSE)
Parameters:
x: matrix
as.factor: a logical value indicating whether the value should be returned as a factor of column labels (created if necessary) rather than as numbers
Getting a Matrix of number of rows in R Programming – row() Function
In this article, we will discuss how to find the number of rows and columns in a matrix in R Programming Language.