reshape_events_df: Reshape Events DF

View source: R/reshape_events_df.R

reshape_events_dfR Documentation

Reshape Events DF

Description

Reshape Events DF

Usage

reshape_events_df(
  df,
  df_format = c("wide", "long"),
  id_column = NULL,
  dictionary_key,
  dictionary_gender = c("male", "female", "all")
)

Arguments

df

dataframe of events

df_format

whether your events dataframe is wide (a column for actor, behavior, and object) or long (multiple rows for each event)

id_column

if your df is in long format, you must supply the column that identifies the individual event

dictionary_key

the actdata dictionary key you are using for your analysis

dictionary_gender

the gender EPA ratings you are using for your analysis. Should be male, female, or average

Value

a dataframe in the format necessary for applying main ACT functions to the events:

Examples


d <- tibble::tibble(actor = "ceo", behavior = "advise", object = "benefactor")
reshape_events_df(df = d, df_format = "wide", dictionary_key = "usfullsurveyor2015", dictionary_gender = "all")

ekmaloney/inteRact documentation built on Feb. 20, 2023, 1:29 p.m.