count_events {abasequence} | R Documentation |
Count the Number of Occurrences of Each Event in a Sequence
Description
This function counts the number of occurrences of each unique event in a sequence. The result is a dataframe with two columns: ID and Frequency.
Usage
count_events(event_vector)
Arguments
event_vector |
A numeric vector representing a sequence of events. |
Value
A dataframe with two columns: ID and Frequency, showing the number of occurrences of each event.
Examples
speaker_no <- c(3, 2, 3, 1, 4, 2, 4, 1, 4, 3, 2, 3)
count_events(speaker_no)
[Package abasequence version 0.1.0 Index]