Skip to content

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.

See also

Author

Stu Field

Examples

cleanNames("    sdkfj...sdlkfj.sdfii4994### ")
#> [1] "sdkfj.sdlkfj.sdfii4994"

cleanNames("Hyb..Scale")
#> [1] "HybControlNormScale"