Search notes:

R function: ncol

df <- data.frame (
  col_1 = 1:5,
  col_2 = letters[1:5] 
)

df
#   col_1 col_2
# 1     1     a
# 2     2     b
# 3     3     c
# 4     4     d
# 5     5     e

ncol(df)
# [1] 2
Github repository about-r, path: /functions/ncol.R

See also

Index to (some) R functions

Index