Which function in R returns the number of rows in a data frame?
a) ncol()
b) length()
c) nrow()
d) count()
Answer:
c) nrow()
Explanation:
The nrow()
function returns the number of rows in a data frame or matrix.
The nrow()
function returns the number of rows in a data frame or matrix.