cutByTable function

Select most frequently occurring values from numeric or categorical variables.

Select most frequently occurring values from numeric or categorical variables.

The "n" most frequently occurring values are returned, sorted by frequency of occurrence (in descending order). The names attribute includes information about the percentage of cases that have the indicated values.

cutByTable(x, n = 5, pct = TRUE)

Arguments

  • x: A numeric or character variable
  • n: The maximum number of values that may be returned.
  • pct: Default = TRUE. Include percentage of responses within each category

Returns

A named vector.

Details

This is used by plotSlopes, plotCurves, and other "newdata" making functions.

Author(s)

Paul E. Johnson pauljohn@ku.edu

  • Maintainer: Paul E. Johnson
  • License: GPL (>= 3.0)
  • Last published: 2022-08-06

Useful links