freq2raw: Convert Frequency Table into Raw Data

Description Usage Arguments Details Value Examples

View source: R/utils.R

Description

Data with unique rows and a frequency column is converted into data with duplicate rows.

Usage

1
freq2raw(data, freq)

Arguments

data

Data frame with factors in columns

freq

Vector of frequency of each row in data; can be a named column in data; if missing, the column Freq is looked for in data

Details

The ouput data frame can be used as input to bbl.

Value

Data frame with one row per instances

Examples

1
2
3
4
5
Titanic
x <- as.data.frame(Titanic)
head(x)
titanic <- freq2raw(data=x[,1:3], freq=x$Freq)
head(titanic)

bbl documentation built on Jan. 28, 2022, 1:07 a.m.