getnames | R Documentation |
Function to extract the vector of frequencies associated with the category names from a data frame.
getnames(dat, st = 3, sep = " ")
dat |
A contingency table in data frame format |
st |
Length of the string for every category name |
sep |
Separator of category names |
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
.
data(madsen)
y<-getnames(madsen,st=3,sep=";")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.