pivot_dyad: Widen data by dyad member.

View source: R/pivot_dyad.R

pivot_dyadR Documentation

Widen data by dyad member.

Description

Widen dataframe by dyad member. At this point, you should have merged your data using load_list and long stack, filtered using relevant criteria using filter_rows, removed orphans with remove_orphans, and smushed with smush_rows.

Usage

pivot_dyad(dat, id_num, output_dir)

Arguments

dat

Dataframe.

id_num

Participant identifier. Defaults to first column in dataframe.

output_dir

Where you want your dataframes to be saved to.

Details

For dyadic data, this is the last step in the workflow. Also note that this function removes the frame variable, leaving behind only timestamp or new_timestamp.

This will output two dataframes: 1) an extra long dataframe by dyad member, and 2) a slightly wider dataframe where each dyad members has their own Action Unit column.


jrcalabrese/faceup documentation built on May 16, 2022, 3:14 p.m.