nrow | R Documentation |
Since rows are also observations, this is also the number of observations in a data frame.
nrow(data)
ncol()
, base::names()
tibble( x = 1:5, y = 6:10 ) %>% nrow() #> [1] 5 ----------------------------------- library(gapminder) gapminder %>% nrow() #> [1] 1704 ----------------------------------- # Use nrow with filter: gapminder %>% filter(lifeExp > 80) %>% nrow() #> [1] 21
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.