closest_term: Closest Term

View source: R/closest_term.R

closest_termR Documentation

Closest Term

Description

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

Usage

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")

ekmaloney/inteRact documentation built on Feb. 20, 2023, 1:29 p.m.