Skip to contents

Convert snake case to subscript

Usage

snake2subscript(
  x,
  sep = "_",
  prefix = "<sub>",
  suffix = "</sub>",
  collapse = NULL,
  recycle0 = FALSE
)

Arguments

x

character

sep

separator defaults to "_"

prefix

character prefix

suffix

character suffix

collapse

character parameter passed to paste0

recycle0

parameter passed to paste0

Value

a character

Examples

snake2subscript("x_1")
#> [1] "x<sub>1</sub>"