Learn R Programming

fsia (version 1.0)

freq: Absolute and Percentage Frequencies of the Responses to the Items.

Description

Calculates and plots the absolute or percentage frequencies of the responses to each item.

Usage

freq(obj, columns, perc = FALSE) "plot"(x, display = TRUE, ...)

Arguments

obj
An object of class fsdata containing the data imported by function read.formscanner.
columns
A vector containing which columns to use. Columns can be specified by name or number.
perc
logical; if TRUE percentage frequencies are calculated.
x
An object of class frlist returned by function freq.
display
logical; if TRUE the frequencies are displayed on the plot.
...
further arguments passed to or from other methods.

Value

Function freq returns an abject of class frlist containing a list with components
item
the name of the item.
tab
an object of class table containing the frequencies.
key
the key of the item.

See Also

read.formscanner

Examples

Run this code
data(exam1)
fr <- freq(obj = exam1, col = c("I2","I3"))
fr
plot(fr)
fr <- freq(obj = exam1, col = 2:11, perc = TRUE)
fr
par(mfrow = c(2,5))
plot(fr)
plot(fr, display = FALSE)

Run the code above in your browser using DataLab