Description Usage Arguments Value
This function simulates volume-time tracing data produced by breathing of a hypothetical subject as recorded by the Harvard spirometer. A number of parameters can be specified to adjust the tracing data. The output of this function is a data frame to be plotted by the user.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | sim_Harvard_tracing(
f = "cos",
t_start = 0,
t_end = 1,
paper_speed = 25,
TV = 500,
RR = 20,
oxycons = 0,
oxycons_unit = c("L/hr", "ml/min"),
y_int_O2_line = 0,
seq_x_by = 0.05,
epsilon_sd = NULL,
seed = 1
)
|
f |
(Character or Symbol) A function to generate 1 respiratory cycle (i.e., inspiration and expiration). The default, currently, is a cosine function. Any function can be specified such that the amplitude is 1 (peak at 1, trough at -1) and the wavelength is |
t_start |
(Numeric) Time point (minute) when the experiment start |
t_end |
(Numeric) Time point (minute) when the experiment end |
paper_speed |
(Numeric) Paper speed (mm/minute) of the tracing |
TV |
(Numeric) Tidal volume (mL) that subject breath |
RR |
(Numeric) Respiratory Rate (/min) of subject |
oxycons |
(Numeric) Oxygen consumption of subject |
oxycons_unit |
(Character) Units of the |
y_int_O2_line |
(Numeric) Y-intercept of an oxygen-line, i.e., the baseline that passed through the trough of each respiratory cycle waves. |
seq_x_by |
(Numeric) Difference between consecutive |
epsilon_sd |
If provided as numeric, it is a standard deviation of an error term sampled from Gaussian distribution with |
seed |
(Numeric) If provided |
A data.frame with "HarvardTracing" subclass which has 3 columns:
x: x-axis data of the respiratory wave tracing (in milimeter)
y: y-axis data of the respiratory wave tracing (in milimeter)
y_O2_line: y-axis data of the oxygen-line (in milimeter)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.