get_time_points: Get time points

Description Usage Arguments Details Value

View source: R/utility.R

Description

The function get_time_points() extracts the numeric information from a vector of character strings, if available.

Usage

1

Arguments

svec

A vector of character strings.

Details

The function expects a vector of character strings that contain numeric information. If the strings contain extractable numeric information a named numeric vector is returned, where the names are derived from the strings provided by svec. For example, from the vector c("t_0", "t_5", "t_10") the named numeric vector (0, 5, 10) is returned, where the names correspond to the original string. If a string does not contain any numeric information NA is returned.

Value

A vector of the same length as svec with the extracted numbers as numeric values.


disprofas documentation built on Dec. 8, 2021, 5:10 p.m.