getnames: vector of frequencies from a data frame

Description Usage Arguments Value Examples

Description

Function to extract the vector of frequencies associated with the category names from a data frame.

Usage

1
getnames(dat, st = 3, sep = " ")

Arguments

dat

A contingency table in data frame format

st

Length of the string for every category name

sep

Separator of category names

Value

The function returns a column vector of the frequencies of every combination of categories of the involved variables in the data frame dat where each column corresponds to a variable, each row to a combination of categories and the last column reports the frequencies. The variables are arranged so that the farther to the left the column is the faster the category changes. Every frequency of each combination of categories is associated with a string of short category names. The length of the names is determined by setting st and consecutive names are separated by the symbol declared by sep.

Examples

1
2
data(madsen)
y<-getnames(madsen,st=3,sep=";")

hmmm documentation built on May 2, 2019, 12:27 p.m.