rowmode | R Documentation |
Returns the modal state of a variable, e.g., the modal state in a sequence.
rowmode(v, except = NULL)
v |
A numerical or factor variable. |
except |
Vector of values that should be ignored; e.g., set |
The function tabulates the variable and returns the most frequent value.
The modal value
Gilbert Ritschard
table
.
data(actcal)
actcal.seq <- seqdef(actcal[1:10,13:24])
actcal.mod <- apply(as.matrix(actcal.seq), 1, rowmode)
head(actcal.mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.