A utility function to get the descriptive statistics for the source frames of a metaphor (for the aggregated synonyms data or for a given synonym, if specified). This function is used in Rajeg (2019, Chapter 5 & 6).

get_frames(
  metaphor = NULL,
  word = NULL,
  df = NULL,
  frame_var = "source_frames",
  metaphor_var = "metaphors",
  synonym_var = "synonyms",
  lexunit_var = "lu"
)

Arguments

metaphor

character strings of regular expressions for the metaphor.

word

character strings of regular expressions for the happiness synonyms.

df

the data frame (phd_data_metaphor).

frame_var

character string for the column name of the source frame variable (i.e., "source_frames").

metaphor_var

character string for the column name of the metaphor variable (i.e., "metaphors").

synonym_var

character string for the column name of the synonyms variable (i.e., "synonyms").

lexunit_var

character string for the column name of the lexical unit variable (i.e., "lu").

Value

A tibble/data frame of the descriptive statistics of the frames, namely the raw and relative (i.e. percentages of the) token and type frequencies. If the word argument is specified, both the source_frames and the synonyms variable are grouped for calculating the token and type frequencies, while percentages of these are summarised per word.

References

Rajeg, G. P. W. (2019). Metaphorical profiles and near-synonyms: A corpus-based study of Indonesian words for HAPPINESS (PhD Thesis). Monash University. Melbourne, Australia. https://doi.org/10.26180/5cac231a97fb1.

Examples

# for aggregated data across all synonyms get_frames(metaphor = "desired goal", df = phd_data_metaphor)
#> # A tibble: 11 x 5 #> frames n type perc type_perc #> <chr> <int> <int> <dbl> <dbl> #> 1 pursue 113 11 38.6 26.2 #> 2 arriving 62 6 21.2 14.3 #> 3 grasp 30 3 10.2 7.14 #> 4 locating 28 4 9.56 9.52 #> 5 source_path_goal 22 4 7.51 9.52 #> 6 self motion 11 3 3.75 7.14 #> 7 access to a location 10 3 3.41 7.14 #> 8 physical path 10 3 3.41 7.14 #> 9 guided motion 3 2 1.02 4.76 #> 10 capturing 2 1 0.68 2.38 #> 11 motion impediments 2 2 0.68 4.76
# for a synonym get_frames(metaphor = "desired goal", word = "^kesenangan", df = phd_data_metaphor)
#> # A tibble: 9 x 6 #> frames synonyms n type perc type_perc #> <chr> <chr> <int> <int> <dbl> <dbl> #> 1 pursue kesenangan 70 7 63.6 35 #> 2 arriving kesenangan 13 3 11.8 15 #> 3 grasp kesenangan 8 2 7.27 10 #> 4 locating kesenangan 8 1 7.27 5 #> 5 source_path_goal kesenangan 6 2 5.45 10 #> 6 motion impediments kesenangan 2 2 1.82 10 #> 7 capturing kesenangan 1 1 0.91 5 #> 8 guided motion kesenangan 1 1 0.91 5 #> 9 self motion kesenangan 1 1 0.91 5
# for synonyms with the same root (e.g. "senang" and "kesenangan") get_frames(metaphor = "desired goal", word = "senang", df = phd_data_metaphor)
#> # A tibble: 12 x 6 #> frames synonyms n type perc type_perc #> <chr> <chr> <int> <int> <dbl> <dbl> #> 1 pursue kesenangan 70 7 63.6 35 #> 2 arriving kesenangan 13 3 11.8 15 #> 3 grasp kesenangan 8 2 7.27 10 #> 4 locating kesenangan 8 1 7.27 5 #> 5 source_path_goal kesenangan 6 2 5.45 10 #> 6 motion impediments kesenangan 2 2 1.82 10 #> 7 capturing kesenangan 1 1 0.91 5 #> 8 guided motion kesenangan 1 1 0.91 5 #> 9 self motion kesenangan 1 1 0.91 5 #> 10 source_path_goal senang 3 2 60 50 #> 11 grasp senang 1 1 20 25 #> 12 pursue senang 1 1 20 25
# for synonyms in the nominalised forms get_frames(metaphor = "desired goal", word = "^(kesenangan|kegembiraan)", df = phd_data_metaphor)
#> # A tibble: 13 x 6 #> frames synonyms n type perc type_perc #> <chr> <chr> <int> <int> <dbl> <dbl> #> 1 locating kegembiraan 2 2 33.3 33.3 #> 2 source_path_goal kegembiraan 2 2 33.3 33.3 #> 3 grasp kegembiraan 1 1 16.7 16.7 #> 4 pursue kegembiraan 1 1 16.7 16.7 #> 5 pursue kesenangan 70 7 63.6 35 #> 6 arriving kesenangan 13 3 11.8 15 #> 7 grasp kesenangan 8 2 7.27 10 #> 8 locating kesenangan 8 1 7.27 5 #> 9 source_path_goal kesenangan 6 2 5.45 10 #> 10 motion impediments kesenangan 2 2 1.82 10 #> 11 capturing kesenangan 1 1 0.91 5 #> 12 guided motion kesenangan 1 1 0.91 5 #> 13 self motion kesenangan 1 1 0.91 5