Skip to content

Commit e81fb3b

Browse files
committed
Update documentation
1 parent 7998600 commit e81fb3b

9 files changed

+18
-16
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ BugReports: https://github.com/ropensci/spiro/issues
2525
Encoding: UTF-8
2626
LazyData: true
2727
Roxygen: list(markdown = TRUE)
28-
RoxygenNote: 7.3.1
28+
RoxygenNote: 7.3.2
2929
Imports:
3030
ggplot2,
3131
xml2,

R/spiro.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
#' English or German language)
2525
#' \item \strong{COSMED} (\code{.xlsx} or \code{.xls} files, in English or
2626
#' German language)
27-
#' \item \strong{Vyntus} (\code{.txt} files in French, German or Norwegian
28-
#' language)
27+
#' \item \strong{Vyntus} (\code{.txt} files in English, French, German or
28+
#' Norwegian language)
2929
#' \item \strong{ZAN} (\code{.dat} files in German language, usually with
3030
#' names in the form of \code{"EXEDxxx"})
3131
#' }

R/spiro_plot.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -816,14 +816,14 @@ vert_lines <- function(data, plot = TRUE) {
816816
if (any(ptcl$type == "load")) {
817817
t1i <- min(which(ptcl$type == "load"))
818818
if (t1i >= 2) { # requires measurements prior to first load
819-
t1 <- cs[t1i-1]
819+
t1 <- cs[t1i - 1]
820820
}
821821
}
822822
# time point 2: first warm-up load
823823
if (any(ptcl$type == "warm up")) {
824824
t2i <- min(which(ptcl$type == "warm up"))
825825
if (t2i >= 2) { # requires measurements prior to first load
826-
t2 <- cs[t2i-1]
826+
t2 <- cs[t2i - 1]
827827
}
828828
}
829829
# time point 3: last load

R/spiro_raw.R

+4-2
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ spiro_raw.spiro <- function(data, device = NULL, anonymize = TRUE) {
6161
}
6262
if (!is.null(device)) {
6363
warning(
64-
paste0("'device' argument in spiro_raw() is ignored when called for an ",
65-
" spiro object")
64+
paste0(
65+
"'device' argument in spiro_raw() is ignored when called for an ",
66+
" spiro object"
67+
)
6668
)
6769
}
6870
# rewrite meta data attribute

man/spiro.Rd

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spiro.Rproj

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 3872f95e-6eeb-4ae0-a43f-272208c7e164
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

tests/testthat/test-spiro_raw.R

-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,3 @@ test_that("overriding of anonymization works", {
1919
test_that("device argument is ignored for spiro class method", {
2020
expect_warning(spiro_raw(spiro(file), device = "cortex"))
2121
})
22-

tests/testthat/test_spiro_plot.R

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ p_color <- spiro_plot(
1313
style_args = list(
1414
color_VO2 = "black", color_VCO2 = "purple", color_RER = "pink",
1515
color_VE = "royalblue", color_VT = "orange", color_HR = "lightblue",
16-
color_pulse = "grey")
16+
color_pulse = "grey"
17+
)
1718
)
1819
p_theme <- spiro_plot(
1920
data,

vignettes/summarizing_plotting.Rmd

+4-5
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ library(spiro)
3232
file <- spiro_example("zan_gxt")
3333
gxt_data <- spiro(file)
3434
gxt_data
35-
3635
```
3736

3837
## Stepwise summary with `spiro_summary()`
@@ -69,7 +68,7 @@ You can individually select and combine panels of the 9-Panel Plot by setting th
6968

7069
```{r spiro_plot-select, fig.width = 7, fig.height = 4}
7170
# Plot only V-Slope (Panel 5) and VO2/VCO2 over time (Panel 3)
72-
spiro_plot(data, which = c(5,3))
71+
spiro_plot(data, which = c(5, 3))
7372
```
7473

7574
Data over time (Panel 1,2,3,6,8,9) will be displayed smoothed, as determined via the `smooth` argument. The other panels (4,5,7) use the raw breath-by-breath data for visualization.
@@ -79,7 +78,7 @@ You can control the appearance of the plots in `spiro_plot()`. Use the `style_ar
7978
```{r spiro_plot-style-1, fig.width = 10, fig.height = 8, message = FALSE}
8079
# Change size of points, width of lines and color of VO2 points/lines
8180
spiro_plot(
82-
data,
81+
data,
8382
style_args = list(
8483
size = 1,
8584
linewidth = 2,
@@ -93,8 +92,8 @@ Use the `base_size` argument to change the plot base size. You can pass other st
9392
```{r spiro_plot-style-2, fig.width = 10, fig.height = 8, message = FALSE}
9493
# Change base size and axis label font
9594
spiro_plot(
96-
data,
97-
base_size = 9,
95+
data,
96+
base_size = 9,
9897
style_args = list(
9998
axis.title = ggplot2::element_text(face = "italic", colour = "blue")
10099
)

0 commit comments

Comments
 (0)