Learn R Programming

rtemis (version 0.79)

labelify: Convert text for label printing

Description

Convert text for label printing

Usage

labelify(x, underscoresToSpaces = TRUE, dotsToSpaces = TRUE,
  toTitleCase = TRUE, capitalize.strings = c("id"),
  stringsToSpaces = c("\\$"))

Arguments

x

String: Input

underscoresToSpaces

Logical: If TRUE, convert underscores to spaces. Default = TRUE

dotsToSpaces

Logical: If TRUE, convert dots to spaces. Default = TRUE

toTitleCase

Logical: If TRUE, convert to Title Case. Default = TRUE

capitalize.strings

String, vector: Always capitalize these strings, if present. Default = "id"

stringsToSpaces

String, vector: Replace these strings with spaces. Escape as needed for gsub. Default = "\$", which formats common input of the type data.frame$variable