ncol | R Documentation |
Since columns are also variables, this is also the
number of variables in a data frame. See base::names()
to find what the variables are called.
ncol(data)
nrow()
, base::names()
tibble( x = 1:5, y = 6:10 ) %>% ncol() #> [1] 2 ----------------------------------- library(gapminder) gapminder %>% ncol() #> [1] 6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.