The $deflection()
method calculates the deflection of an ABO event.
Value
An "Event deflection" data frame.
This data frame has an event_deflection
S3 class with custom printing that
works seamlessly with the family of get_*
functions.
Examples
act <- interact()
#> ✔ dictionary = list(dataset = "usfullsurveyor2015", group = "all")
#> ✔ equations = list(key = "us2010", group = "all")
act$deflection(data.frame(A = "mother", B = "kick", O = "baby"))
#> # Event deflection
#> # A data frame: 1 × 4
#> A B O deflection
#> * <chr> <chr> <chr> <dbl>
#> 1 mother kick baby 64.0
grid <- expand.grid(
A = c("girlfriend", "medic", "bohemian", "dairy_farmer", "daredevil"),
B = c("help", "retaliate_against", "torment", "interrogate"),
O = c("toddler", "capitalist", "boyfriend", "prisoner")
)
head(grid, n = 15)
#> A B O
#> 1 girlfriend help toddler
#> 2 medic help toddler
#> 3 bohemian help toddler
#> 4 dairy_farmer help toddler
#> 5 daredevil help toddler
#> 6 girlfriend retaliate_against toddler
#> 7 medic retaliate_against toddler
#> 8 bohemian retaliate_against toddler
#> 9 dairy_farmer retaliate_against toddler
#> 10 daredevil retaliate_against toddler
#> 11 girlfriend torment toddler
#> 12 medic torment toddler
#> 13 bohemian torment toddler
#> 14 dairy_farmer torment toddler
#> 15 daredevil torment toddler
act$deflection(grid)
#> # Event deflection
#> # A data frame: 80 × 4
#> A B O deflection
#> * <chr> <chr> <chr> <dbl>
#> 1 girlfriend help toddler 14.5
#> 2 medic help toddler 25.0
#> 3 bohemian help toddler 8.87
#> 4 dairy_farmer help toddler 11.4
#> 5 daredevil help toddler 11.5
#> 6 girlfriend retaliate_against toddler 15.8
#> 7 medic retaliate_against toddler 21.2
#> 8 bohemian retaliate_against toddler 10.8
#> 9 dairy_farmer retaliate_against toddler 16.4
#> 10 daredevil retaliate_against toddler 8.96
#> # ℹ 70 more rows