A function to find the closest measured identity, behavior, or modifier to a specified E, P, A location.

closest_term(
  e,
  p,
  a,
  dictionary_key,
  dictionary_gender,
  term_typ = c("identity", "behavior", "modifier"),
  max_dist = 1,
  num_terms = 10
)

Arguments

e

a numeric variable equaling the Evaluation of the EPA location

p

a numeric variable equaling the Potency of the EPA location

a

a numeric variable equaling the Activity of the EPA location

dictionary_key

a string corresponding to the dictionary from actdata you are using for cultural EPA measurements

term_typ

a string indicating whether you are looking for an identity, behavior, or modifier

max_dist

a numeric variable equaling the maximum distance a term can be away from your EPA location

gender

either average, male, or female, depending on if you are using gendered equations

Value

a dataframe listing terms matching your search. Includes variables indicating element-wise distance and sum of squared differences.

Examples

closest_term(1, 2.5, 3, dictionary_key = "usfullsurveyor2015", dictionary_gender = "average", term_typ = "identity")
#> # A tibble: 5 × 5
#>   term_name term_E term_P term_A   ssd
#>   <chr>      <dbl>  <dbl>  <dbl> <dbl>
#> 1 boxer       0.66   2.46   2.4  0.477
#> 2 daredevil   0.51   1.74   3.08 0.824
#> 3 fighter     0.62   2.36   2.17 0.853
#> 4 extrovert   1.33   1.69   2.66 0.881
#> 5 athlete     1.81   2.5    2.45 0.959