Description Usage Arguments Author(s) Examples
Shows the most frequent value (mode)
1 2 | mode_cell(x, y, z, w, cell_ids, row_ids, col_ids, vnames, vars, n_min,
digits=3)
|
x |
The x variable |
y |
NOT USED |
z |
NOT USED |
w |
Weights for x variable. Only if calculating weighted mode. |
cell_ids |
Index vector for selecting values in cell. |
row_ids |
Index vector for selecting values in row. |
col_ids |
Index vector for selecting values in col. |
vnames |
NOT USED |
vars |
NOT USED |
n_min |
NOT USED |
digits |
Integer indicating the number of significant digits. |
Andreas Schulz <ades-s@web.de>
1 2 3 4 5 6 7 8 9 | sex <- factor(rbinom(1000, 1, 0.4), labels=c('Men', 'Women'))
note <- as.factor(rbinom(1000, 4, 0.5)+1)
decades <- rbinom(1000, 3, 0.5)
decades <- factor(decades, labels=c('[35,45)','[45,55)','[55,65)','[65,75)'))
d<-data.frame(sex, decades, note)
tabular.ade(x_vars=c('note'), xname=c('Noten'),
rows=c('sex','ALL','decades'), rnames=c('Gender', 'Age decades'),
data=d, FUN=mode_cell)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.