Calculate the Optimal Behavior for the Actor or Object following an Event
Source:R/InteRactModel.R
method-optimal-behavior.Rd
The $optimal_behavior()
method does this and that..
Usage
optimal_behavior(x, who = c("actor", "object"))
See also
Other InteRactModel methods:
method-add-equation
,
method-characteristic-emotion
,
method-closest-terms
,
method-deflection
,
method-fundamentals
,
method-max-confirm
,
method-modify-identity
,
method-reidentify
Examples
act <- interact()
#> ✔ dictionary = list(dataset = "usfullsurveyor2015", group = "all")
#> ✔ equations = list(key = "us2010", group = "all")
events <- rbind(
data.frame(A = "ceo", B = "rescue", O = "baby"),
data.frame(A = "ceo", B = "torment", O = "baby")
)
d <- act$deflection(events)
d
#> # Event deflection
#> # A data frame: 2 × 4
#> A B O deflection
#> * <chr> <chr> <chr> <dbl>
#> 1 ceo rescue baby 4.44
#> 2 ceo torment baby 50.1
act$optimal_behavior(d, who = "actor")
#> # A tibble: 2 × 3
#> Be Bp Ba
#> <dbl> <dbl> <dbl>
#> 1 0.901 2.17 1.18
#> 2 -1.32 1.51 1.24
act$optimal_behavior(d, who = "object")
#> # A tibble: 2 × 3
#> Be Bp Ba
#> <dbl> <dbl> <dbl>
#> 1 -0.0353 -0.821 0.484
#> 2 -0.167 1.11 0.443