extract.first.number: Extract the first number from a string

View source: R/clanToolsFunctions.R

extract.first.numberR Documentation

Extract the first number from a string

Description

Extract the first numbers from each individual string element in a vector.

Usage

extract.first.number(c("aa+45", "hello9abe999"))

Arguments

x

is a vector of string values

Value

A list with the numbers ($number) and the remaining strings after the number ($rest.string).

Author(s)

Claus E. Andersen


claus-e-andersen/clanTools documentation built on Nov. 30, 2024, 11:06 p.m.