Computes the frequency table of the sequences (count and percent of each sequence).

1 |

`seqdata` |
a sequence object as defined by the |

`idxs` |
returns the table for the sequences at ranks ' |

`weighted` |
if |

`format` |
format used for displaying the rownames (the sequences) in the output table.
Default is SPS format, which yields shorter and more readable sequence representations.
Alternatively, |

`tlim` |
Deprecated. Use |

The `weighted`

argument has no effect when no weights were assigned to the state sequence object since weights default in that case to 1.

An object of class `stslist.freq`

. This is actually a state sequence object (containing a list of state sequences) with added attributes, among others the `freq`

attribute containing the frequency table. There are `print`

and `plot`

methods for such objects. More sophisticated plots can be produced with the `seqplot`

function.

Alexis Gabadinho (with Gilbert Ritschard for the help page)

Gabadinho, A., G. Ritschard, N. S. MÃ¼ller and M. Studer (2011). Analyzing and Visualizing State Sequences in R with TraMineR. *Journal of Statistical Software* **40**(4), 1-37.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ```
## Creating a sequence object from the actcal data set
data(actcal)
actcal.lab <- c("> 37 hours", "19-36 hours", "1-18 hours", "no work")
actcal.seq <- seqdef(actcal, 13:24, labels=actcal.lab)
## 10 most frequent sequences in the data
seqtab(actcal.seq)
## With idxs=0, we get all distinct sequences in the data set
## sorted in decreasing order of their frequency
seqtab(actcal.seq, idxs=0)
## Example with weights
## from biofam data set using weigths
data(ex1)
ex1.seq <- seqdef(ex1, 1:13, weights=ex1$weights)
## Unweighted frequencies
seqtab(ex1.seq, weighted=FALSE)
## Weighted frequencies
seqtab(ex1.seq, weighted=TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.