papaja (version 0.1.2)

sanitize_terms: Sanitize Term Names

Description

Remove characters from term names that will be difficult to address using the $-operator. This function is not exported.

Usage

sanitize_terms(x, standardized = FALSE)

# S3 method for character sanitize_terms(x, standardized = FALSE)

# S3 method for factor sanitize_terms(x, standardized = FALSE)

# S3 method for data.frame sanitize_terms(x, standardized = FALSE)

# S3 method for list sanitize_terms(x, standardized = FALSE)

Value

An object of the same class as x containing sanitized term names as characters.

Arguments

x

Character. Vector of term names to be sanitized.

standardized

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

Examples

Run this code
  sanitize_terms(c("(Intercept)", "Factor A", "Factor B", "Factor A:Factor B", "scale(FactorA)"))

Run the code above in your browser using DataLab