Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

parse_hms

Parsing hms values


Description

These functions convert character vectors to objects of the hms class. NA values are supported.

parse_hms() accepts values of the form "HH:MM:SS", with optional fractional seconds.

parse_hm() accepts values of the form "HH:MM".

Usage

parse_hms(x)

parse_hm(x)

Arguments

x

A character vector

Value

An object of class hms.

Examples

parse_hms("12:34:56")
parse_hms("12:34:56.789")
parse_hm("12:34")

hms

Pretty Time of Day

v1.0.0
MIT + file LICENSE
Authors
Kirill Müller [aut, cre], R Consortium [fnd], RStudio [fnd]
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.