Modal state of a variable
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
data(actcal) actcal.seq <- seqdef(actcal[1:10,13:24]) actcal.mod <- apply(as.matrix(actcal.seq), 1, rowmode) head(actcal.mod)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.