parse_no_hour_time: Function to parse a time with greater than 60 minuntes to a...

View source: R/parse_no_hour_time.R

parse_no_hour_timeR Documentation

Function to parse a time with greater than 60 minuntes to a period.

Description

parse_no_hour_time will format and parse a time such as 124.17 (124 minutes and 17 seconds) to a period with hour, minutes, and seconds.

Usage

parse_no_hour_time(x, format = "period")

Arguments

x

Vector of times in no hour format.

format

What format of return is desired? The options are "period", "hms", or "seconds".

Value

Period, hms, or numeric vector.

Author(s)

Stuart K. Grange

See Also

period_to_date, period_to_string

Examples


# Parse a times with no hour
parse_no_hour_time(c(124.17, "89:22"))

# As hms
parse_no_hour_time(c(124.17, "89:22"), format = "hms")

# Or as seconds
parse_no_hour_time(c(124.17, "89:22"), format = "seconds")



skgrange/threadr documentation built on May 11, 2024, 12:16 p.m.