add_protocol {spiro}R Documentation

Add a test protocol to an exercise testing data set

Description

add_protocol() adds a predefined test protocol to an existing set of data from an exercise test.

Usage

add_protocol(data, protocol)

Arguments

data

A spiro data.frame containing the exercise testing data.

protocol

A data.frame containing the test protocol, as created by set_protocol, set_protocol_manual or get_protocol.

Value

A data.frame of the class spiro with cardiopulmonary parameters and the corresponding load data.

See Also

set_protocol for protocol setting with helper functions.

set_protocol_manual for manual protocol design.

get_protocol For automated extraction of protocols from raw data.

Examples

# Get example data
file <- spiro_example("zan_gxt")

s <- spiro(file)
out <- add_protocol(
  s,
  set_protocol(pt_pre(60), pt_steps(300, 50, 50, 7, 30))
)
head(out)

[Package spiro version 0.2.1 Index]