Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

cutByTable

Select most frequently occurring values from numeric or categorical variables.


Description

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.

Usage

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

Details

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

Value

A named vector.

Author(s)

Paul E. Johnson <pauljohn@ku.edu>


rockchalk

Regression Estimation and Presentation

v1.8.144
GPL (>= 3.0)
Authors
Paul E. Johnson [aut, cre], Gabor Grothendieck [ctb]
Initial release
2019-03-07

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.