set_protocol_manual {spiro}R Documentation

Manually setting a testing profile

Description

set_protocol_manual() allows to set any user-defined load profile for an exercise test.

Usage

set_protocol_manual(duration, load = NULL)

## Default S3 method:
set_protocol_manual(duration, load)

## S3 method for class 'data.frame'
set_protocol_manual(duration, load = NULL)

Arguments

duration

Either a numeric vector containing the duration (in seconds) of each load step, or a data.frame containing columns for duration and load.

load

A numeric vector of the same length as duration containing the corresponding load of each step. Not needed, if load and duration are both given in a data.frame as the first argument of the function.

Value

A data.frame with the duration and load of each protocol step.

Methods (by class)

See Also

set_protocol for protocol setting with helper functions.

get_protocol For automated extracting of protocols from raw data.

Examples

set_protocol_manual(
  duration = c(300, 120, 300, 60, 300),
  load = c(3, 5, 3, 6, 3)
)

# using a data.frame as input
pt_data <- data.frame(
  duration = c(180, 150, 120, 90, 60, 30),
  load = c(200, 250, 300, 350, 400, 450)
)
set_protocol_manual(pt_data)

[Package spiro version 0.2.1 Index]