freq_item: Get frequencies in an item and plot them

Description Usage Arguments Value Examples

Description

Get frequencies in an item and plot them

Usage

1

Arguments

item

The item to be analysed. Must be a vector.

range

The range of valid values.

plot

logical, if a plot should be plotted. Defaultis to FALSE.

...

Further arguments passed on to barplot.

Value

Returns a frequency table of the entries in that item. Optionally, also a barplot of these items.

Examples

1
2
3
item <- c(rep(1, 19), rep(2, 8), rep(3, 26), rep(4, 29),
          rep(5, 5), rep(NA, 5), rep(-2, 4), rep(-3, 4))
freq_item(item, range = c(1,5), plot = TRUE, col = "#00376c")

kthorstmann/consr documentation built on May 20, 2019, 7:04 p.m.