Skip to contents

Function removes all non-numeric characters from a string.

Usage

removeNonNumeric ( string)

Arguments

string

a character vector

Value

a character string

Author

Sebastian Weirich

Examples

str <- c(".d1.nh.120", "empty", "110", ".nh.dgd", "only.nh")
removeNonNumeric(str)
#> [1] "1120" ""     "110"  ""     ""