generate_length_aba {abasequence}R Documentation

Generate Length of Consecutive 'ABA'-Coded Sequences

Description

This function calculates the length of consecutive 'ABA'-coded sequences that share common elements in their ID. It assigns NA to non-'ABA' codes.

Usage

generate_length_aba(codes_df)

Arguments

codes_df

A dataframe of codes generated by the generate_codes function and processed by the create_is_aba function.

Value

A dataframe of codes with an additional column representing the length of 'ABA' sequences.

Examples

speaker_no <- c(3, 2, 3, 1, 4, 2, 4, 1, 4, 3, 2, 3)
sequences <- generate_sequences(speaker_no, 3)
codes <- generate_codes(sequences)
aba <- create_is_aba(codes)
length_aba <- generate_length_aba(aba)


[Package abasequence version 0.1.0 Index]