commonlist: commonlist

Description Usage Arguments Examples

View source: R/tableFns.R

Description

Produces an ordered list by frequency.

Usage

1

Arguments

group
cut

frequency cut-off value

plot

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (group, cut = 20, plot = FALSE) 
{
    x <- as.data.frame(table(group))
    x <- data.frame(x, prop = x$Freq/sum(x$Freq))
    if (plot) {
        plot(x$Var1[x$Freq > cut], x$Freq[x$Freq > cut], las = 3)
    }
    x[x$Freq > cut, ][order(x[x$Freq > cut, "Freq"], decreasing = TRUE), 
        ]
  }

n8thangreen/HESmanip documentation built on March 21, 2020, 12:20 a.m.