get_frames: Retrieve the descriptive distributional statistics of source...

Description Usage Arguments Value References Examples

View source: R/get_frames.R

Description

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

Usage

1
2
3
4
5
6
7
8
9
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# for aggregated data across all synonyms
get_frames(metaphor = "desired goal",
           df = phd_data_metaphor)

# for a synonym
get_frames(metaphor = "desired goal",
           word = "^kesenangan",
           df = phd_data_metaphor)

# for synonyms with the same root (e.g. "senang" and "kesenangan")
get_frames(metaphor = "desired goal",
           word = "senang",
           df = phd_data_metaphor)

# for synonyms in the nominalised forms
get_frames(metaphor = "desired goal",
           word = "^(kesenangan|kegembiraan)",
           df = phd_data_metaphor)

gederajeg/happyr documentation built on Dec. 27, 2021, 3:24 a.m.