beautify_terms: Prettify Term Names

View source: R/utils_text.R

beautify_termsR Documentation

Prettify Term Names

Description

Remove parentheses, replace colons with $\times$. Useful to prettify term names in apa_print() tables.

Usage

beautify_terms(x, ...)

## S3 method for class 'character'
beautify_terms(x, standardized = FALSE, retain_period = FALSE, ...)

## S3 method for class 'numeric'
beautify_terms(x, standardized = FALSE, ...)

## S3 method for class 'factor'
beautify_terms(x, standardized = FALSE, ...)

## S3 method for class 'data.frame'
beautify_terms(x, ...)

Arguments

x

Character. Vector of term names to be prettified.

...

Additional arguments passed to apa_num(), for numeric values in x, ignored otherwise.

standardized

Logical. If TRUE, the name of the function scale() will be removed from term names.

retain_period

Logical. If TRUE, any periods in term names will be retained, otherwise they will be replaced by a space.

Value

A character vector or data.frame (if x is a data.frame) containing term names modified for nicer printing.

Examples

beautify_terms("a:b")
beautify_terms("scale(x)", standardized = TRUE)
beautify_terms("snake_case")

papaja documentation built on Oct. 30, 2024, 9:09 a.m.