value_initial_cleaning {clinpubr}R Documentation

Preliminarily cleaning numerical string vectors

Description

Cleaning illegal characters in string vectors that store numerical values. The function is useful for cleaning electrical health records in Chinese.

Usage

value_initial_cleaning(x)

Arguments

x

A string vector that stores numerical values.

Details

The function will convert full-width characters to half-width characters, remove spaces and extra dots, and replace empty strings with NA.

Value

A string vector that stores cleaner numerical values.

Examples

x <- c("\uFF11\uFF12\uFF13", "11..23", "\uff41\uff42\uff41\uff4e\uff44\uff4f\uff4e")
value_initial_cleaning(x)

[Package clinpubr version 1.0.1 Index]