Learn R Programming

medparser (version 0.2.0)

PullStringFromIndex: PullStringFromIndex

Description

Pulls indices from MPC arrays

Usage

PullStringFromIndex(allText, index)

Value

stringValue

A character string following the index start

Arguments

allText

Character string containing MPC file

index

A number specifying the index where the array or value of interest begins in the MPC file

Author

Olivia Ortelli, Tony Colarusso

Examples

Run this code
file_path <- system.file("extdata", "ExampleMPCOutput.txt", package = "medparser")
allText = readLines(file_path)
B_index = 1+grep("B:", allText[-1], value = FALSE)
Left_LeverPressBout = DecimalStringToInteger(PullStringFromIndex(allText,B_index+1))

Run the code above in your browser using DataLab