TimestampPull {medparser}R Documentation

TimestampPull

Description

Pulls timestamps in H:M:S format

Usage

TimestampPull(allText, HMSindex)

Arguments

allText

Character string containing MPC file

HMSindex

A number specifying the index to pull from the H, M, and S arrays

Value

HMS

A single character combining the values from the H, M, and S arrays to read a complete time stamp (H:)

Author(s)

Olivia Ortelli, Tony Colarusso

Examples

file_path <- system.file("extdata", "ExampleMPCOutput.txt", package = "medparser")
allText = readLines(file_path)
C_index = 1+grep("C:", allText[-1], value = FALSE)
H_index = 1+grep("H:", allText[-1], value = FALSE)
M_index = 1+grep("M:", allText[-1], value = FALSE)
NumberOfTimestampsRecorded = (M_index-1)-(H_index+1)
firsttimestamp = TimestampPull(allText,1)

[Package medparser version 0.1.0 Index]