powered by
Often the names, particularly within soma_adat objects, are messy due to varying inputs, this function attempts to remedy this by removing the following:
soma_adat
trailing/leading/internal whitespace
non-alphanumeric strings (except underscores)
duplicated internal dots (..), (...), etc.
..
...
SomaScan normalization scale factor format
cleanNames(x)
A cleaned up character string.
Character. String to clean up.
Stu Field
trimws(), gsub(), sub()
trimws()
gsub()
sub()
cleanNames(" sdkfj...sdlkfj.sdfii4994### ") cleanNames("Hyb..Scale")
Run the code above in your browser using DataLab