Learn R Programming

spiro (version 0.2.3)

add_protocol: 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)

Value

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

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.

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

Run this code
# 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)

Run the code above in your browser using DataLab