getIndex: getIndex

getIndexR Documentation

getIndex

Description

Returns the index in 'Time' matching HHMMSS

Usage

getIndex(Time, HHMMSS)

Arguments

Time

A POSIXct-format vector or a data.frame containing a similar variable 'Time"

HHMMSS

An integer representing time in HHMMSS format

Details

Find the index in a POSIXct time variable that corresponds to a specified time in HHMMSS format. Returns -1 if the requested time is outside the range in 'Time'

Value

A numeric index in the Time vector corresponding to the requested time, or -1 if there is no match.

Author(s)

William Cooper

Examples

idx <- getIndex (RAFdata, 201130)

NCAR/Ranadu documentation built on Jan. 27, 2023, 1:09 a.m.