cleanNames: Clean Up Character String

View source: R/cleanNames.R

cleanNamesR Documentation

Clean Up Character String

Description

Often the names, particularly within soma_adat objects, are messy due to varying inputs, this function attempts to remedy this by removing the following:

  • trailing/leading/internal whitespace

  • non-alphanumeric strings (except underscores)

  • duplicated internal dots (..), (...), etc.

  • SomaScan normalization scale factor format

Usage

cleanNames(x)

Arguments

x

Character. String to clean up.

Value

A cleaned up character string.

Author(s)

Stu Field

See Also

trimws(), gsub(), sub()

Examples

cleanNames("    sdkfj...sdlkfj.sdfii4994### ")

cleanNames("Hyb..Scale")

SomaDataIO documentation built on April 4, 2025, 2:14 a.m.