knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(actdata)
library(dplyr)

Equations

This package makes available tables containing estimates of affect control theory equation coefficients. These coefficients can be used in conjunction with dictionaries to calculate affective responses to various situations. See section 18.2 of David Heise's Expressive Order (2007) for a detailed description of the structure and use of these tables.

Accessing equations

Metadata on available equations is in the table below, and can also be printed to the console in R by running eqn_info(). All of the available equation sets were originally sourced from Interact (version 2.1 beta, accessed May 2021), and component titles are based on labels applied in Interact.

eqn_table <- actdata:::get_meta("eqn") %>% 
  dplyr::select(key, gendercomponents)

names(eqn_table) <- c("Equation key", "Components and genders")

eqn_table %>% 
  kableExtra::kable() %>% 
  kableExtra::kable_styling()

Data frames of equation coefficients are stored in an object called equations. To access one, use the get_eqn() function. This function takes three pieces of metadata and returns the correct data frame of coefficients. These pieces of metadata are:



ahcombs/actdata documentation built on Jan. 15, 2025, 6:48 p.m.