var_to_source: Convert a variable name to APA citation

View source: R/cite_functions.R

var_to_sourceR Documentation

Convert a variable name to APA citation

Description

Converts the name of a variable from LexOPS::lexops (e.g. "Zipf.SUBTLEX_US") into an APA-style citation (e.g. "SUBTLEX-US (Brysbaert & New, 2009)").

Usage

var_to_source(var, first_cite = TRUE, default = "", standard_eval = FALSE)

Arguments

var

The variable name (non-standard evaluation)

first_cite

Logical; if TRUE, gives full citation, if FALSE, gives abbreviated (i.e. "et al.") citation

default

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

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_source(Zipf.SUBTLEX_UK)

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

var_to_source(AoA.Kuperman, first_cite = FALSE)


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