generate_states: Function to coarsen sentiment data into binary states

Description Usage Arguments Examples

View source: R/generate_states.R

Description

Function to coarsen sentiment data into binary states

Usage

1
generate_states(df, date, side_var, side1, side2, state_var, sentiment_var)

Arguments

df

Dataframe containing sentiment levels

date

Name of var that contains date var for sorting

side_var

Name of var in df that contains side

side1

Name to assign side 1

side2

Name to assign side 2

state_var

Name to assign the state variable

sentiment_var

Name of the var in df that contains sentiment level

Examples

1
generate_states(mnl_df, "date", "side", "FARC", "govt", "state_t", "sentiment_level")

leslie-huang/MApkg documentation built on May 21, 2019, 5:11 a.m.