var_to_measure: Convert a variable name to its measure

View source: R/cite_functions.R

var_to_measureR Documentation

Convert a variable name to its measure

Description

Converts the name of a variable from LexOPS::lexops (e.g. "fpmw.SUBTLEX_US") into the name of its measure (e.g. "frequency per million words").

Usage

var_to_measure(
  var,
  first_cite = TRUE,
  default = "",
  title_caps = FALSE,
  include_pronunciations = TRUE,
  standard_eval = FALSE
)

Arguments

var

The variable name (non-standard evaluation)

first_cite

Logical; if TRUE, gives full name (e.g. frequency per million words), if FALSE, gives abbreviated name (e.g. FPMW)

default

The character string that should be returned if the variable does not have a known cietable source

title_caps

Logical; use title capitalisation (e.g. "Familiarity Ratings" rather than "famliarity ratings"). Default is FALSE.

include_pronunciations

Logical; allow pronunciation transpositions as measures (e.g. CMU.1letter). Default is TRUE.

standard_eval

Logical; bypasses non-standard evaluation. If TRUE, var should be a column name in quotation marks. If FALSE, the quotation marks are not necessary. Default = FALSE.

Value

A citation of a variable's source in APA format. Returns default if not recognised as a citeabile source.

Examples


var_to_measure(Zipf.SUBTLEX_UK)

var_to_measure("AROU.Glasgow_Norms", standard_eval = TRUE)

var_to_measure(AoA.Kuperman, first_cite = FALSE)


JackEdTaylor/LexOPS documentation built on Oct. 11, 2024, 10:38 p.m.