segmentRefine_protocol: Segment within a JSONLabel with protocol information

Description Usage Arguments Details Examples

View source: R/segmentRefine_protocol.r

Description

Takes a segmented "FemFit" object and constructs new baseline and event labels within the specified JSONLabel.

Usage

1
2
segmentRefine_protocol(x, whichSession, whichJSONLabel, numOfEvents,
  baselineDuration, eventDuration, timeScale = 1000)

Arguments

x

An "FemFit" object.

whichSession

A character string which identifies which session to edit.

whichJSONLabel

A character string which identifies which JSONLabel to edit.

numOfEvents

How many events to identify.

baselineDuration

Define the duration of a baseline region before an event region (in seconds). Recyles to length numOfEvents.

eventDuration

Define the duration of an event region (in seconds). Recyles to length numOfEvents.

timeScale

Time scale to work on. Defaults to working in seconds.

Details

If a vector is inputted for either whichSession or whichJSONLabel, only the first element is used.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Read in the FemFit data
AS005 = read_FemFit(c(
        "Datasets_AukRepeat/61aa0782289af385_283_csv.zip",
        "Datasets_AukRepeat/61aa0782289af385_284_csv.zip"
    ),
    remove.NAs = TRUE
  ) %>%
  # Segment the FemFit data
  segment(
    cp. = 0.001,
    numOfNodesToLabel = list(c(3, 1, 3, 4), c(4, 1, 5, 3))
  )

# Within a session refine the segmentation with protocol information
AS005r = segmentRefine_protocol(
    x = AS005,
    whichSession = "283 09:28",
    whichJSONLabel = "valsalva3x6s_rest30s",
    numOfEvents = 3,
    baselineDuration = c(16, 12, 12),
    eventDuration =  c(5.5, 5, 5)
  )

TheGreatGospel/FemFit documentation built on May 21, 2019, 9:19 a.m.