get_24_hour_clock {capl}R Documentation

Convert 12-hour clock values to 24-hour clock values.

Description

This function converts 12-hour clock values to 24-hour clock values.

Usage

get_24_hour_clock(x = NA)

Arguments

x

A character vector representing values in 12-hour clock format.

Details

Other capl functions called by this function include: validate_character() and validate_integer().

Value

Returns a 24-hour clock vector (if valid) or NA (if not valid).

Examples

get_24_hour_clock(c("5:00 am", "7:10PM", "9:37", NA, "21:13", "", 9, "6:17"))

# [1] "05:00" "19:10" "09:37" NA      "21:13" NA      NA      "06:17"


[Package capl version 1.39 Index]