Replaces the `ppid` and `session_num` of data in your trial results. This is used if, for example, you must repeat some specific trials with a participant under a new PPID. This replaces the trials found in the trial results with those under the alternative ppid. They are marked with a new session number to allow them to be distinguished. Any episodes (as defined by the string in the episode column) are replaced with those in the replacement session.

apply_replacements(df, replacements_df)

Arguments

df

A trial results data frame.

replacements_df

A data frame with columns `"ppid_old"`,`"ppid_new"`,`"session_num_new"`.