Skip to contents

The $modify_identity() applies the modifier equations (traitid) to find the EPA profile of a modified identity.

Usage

modify_identity(events)

Arguments

events

A data frame with M (modifier) and I (identity) columns

Value

A new dictionary rating for the modified identities

Examples

act <- interact()
#>  dictionary = list(dataset = "usfullsurveyor2015", group = "all")
#>  equations = list(key = "us2010", group = "all")

act$add_equation(type = "traitid", group = "all")
#>  traitid = list(key = "us2010", group = "all")

new_term <- act$modify_identity(list(M = "angry", I = "doctor"))
new_term
#> # A tibble: 1 × 3
#>   term          component ratings  
#>   <chr>         <chr>     <list>   
#> 1 angry__doctor identity  <dbl [3]>
new_term$ratings
#> [[1]]
#>         e         p         a 
#> -1.050056  2.253300  1.078900 
#> 

grid <- data.frame(
  M = c("tired", "taciturn", "angry", "happy"),
  I = c("academic", "academic", "academic", "academic")
)

act$modify_identity(grid)
#> # A tibble: 4 × 3
#>   term               component ratings  
#>   <chr>              <chr>     <list>   
#> 1 tired__academic    identity  <dbl [3]>
#> 2 taciturn__academic identity  <dbl [3]>
#> 3 angry__academic    identity  <dbl [3]>
#> 4 happy__academic    identity  <dbl [3]>