datacamp/rdocumentation-2.0

nrow() function doesn't work for vectors

agoel25 opened this issue · 0 comments

If a vector is used as the argument to the nrow() function, the function returns NULL.

Example:
vector <- c(1, 2, 3, 4, 5)
nrow(vector)

(expected = 5)
(actual = NULL)