freq2case: Convert frequency table to raw data

Description Usage Arguments Value Author(s) References Examples

Description

Convert frequency table to raw data(case form). This is a useful function to convert the data written by Michael Friendly.

Usage

1
freq2case(x, var.names = NULL, freq.name = "Freq", freq.col = NULL, ...)

Arguments

x

A table object, or a data frame in frequency form containing ranks and one numeric variable representing the frequency for that rank.

var.names

A list of variable names for the factors, if you wish to override those already in the table.

freq.name

The name of the frequency variable in the table.

freq.col

The column index of the frequencies.

...

Other arguments passed down to type.convert.

Value

A data frame containing the factors in the table and as many observations as are represented by the total of the freq variable.

Author(s)

Michael Friendly, edited by Li Qinglong <liqinglong0830@163.com>

References

Posted on R-Help, Jan 20, 2009. http://tolstoy.newcastle.edu.au/R/e6/help/09/01/1873.html

Examples

1
2
3
data(APA)
cases = freq2case(APA, freq.col = 1)
freqs = case2freq(cases)

StatMethRank documentation built on Jan. 15, 2017, 8:59 p.m.