R count()

  • count() lets you quickly count the unique values of one or more variables


  • x: data frame
  • Frequency weights, can be NULL or variable. NULL counts the number in each group or variable sum(wt)
  • sort: default is ascending order. If TRUE, it defaults to counting down.
  • name: The name of the new column in the output. Default is n or nn and so on.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top