Projet francis

Data

data <- data.frame(
  Participant = c("OLS001", "OLS002", "OLS003", "OLS004"),
  Age = c(32, 29, 20, 18),
  VO2_T1 = c(36.853, 42.61, 39.958, 37.663),
  VO2_T2 = c(43.267, 42.61, 46.219, 44.113),
  Sys_T1 = c(126, 122, 105, 130),
  Dia_T1 = c(90, 74, 55, 68),
  Sys_T2 = c(122, 102, 104, 130),
  Dia_T2 = c(80, 62, 64, 60),
  RHR_T1 = c(72, 82, 75, 70),
  RHR_T2 = c(68, 79, 79, 62),
  HGL_T1 = c(43.2, 45.7, 31.7, 40.5),
  HGL_T2 = c(47.5, 44.1, 32.1, 39.3),
  HGR_T1 = c(42.3, 46.7, 33.5, 55.2),
  HGR_T2 = c(49.6, 46.1, 33.7, 53.9)
)

print(data)
  Participant Age VO2_T1 VO2_T2 Sys_T1 Dia_T1 Sys_T2 Dia_T2 RHR_T1 RHR_T2
1      OLS001  32 36.853 43.267    126     90    122     80     72     68
2      OLS002  29 42.610 42.610    122     74    102     62     82     79
3      OLS003  20 39.958 46.219    105     55    104     64     75     79
4      OLS004  18 37.663 44.113    130     68    130     60     70     62
  HGL_T1 HGL_T2 HGR_T1 HGR_T2
1   43.2   47.5   42.3   49.6
2   45.7   44.1   46.7   46.1
3   31.7   32.1   33.5   33.7
4   40.5   39.3   55.2   53.9

Stat descriptive

desc_stats <- function(x) {
  c(
    N = length(x),
    Moyenne = mean(x, na.rm = TRUE),
    SD = sd(x, na.rm = TRUE),
    Min = min(x, na.rm = TRUE),
    Max = max(x, na.rm = TRUE)
  )
}

cat("\n--- Statistiques descriptives VO2_T1 ---\n")

--- Statistiques descriptives VO2_T1 ---
print(desc_stats(data$VO2_T1))
        N   Moyenne        SD       Min       Max 
 4.000000 39.271000  2.585426 36.853000 42.610000 
cat("\n--- Statistiques descriptives VO2_T2 ---\n")

--- Statistiques descriptives VO2_T2 ---
print(desc_stats(data$VO2_T2))
        N   Moyenne        SD       Min       Max 
 4.000000 44.052250  1.570053 42.610000 46.219000 
cat("\n--- Statistiques descriptives Sys_T1 ---\n")

--- Statistiques descriptives Sys_T1 ---
print(desc_stats(data$Sys_T1))
        N   Moyenne        SD       Min       Max 
  4.00000 120.75000  10.99621 105.00000 130.00000 
cat("\n--- Statistiques descriptives Sys_T2 ---\n")

--- Statistiques descriptives Sys_T2 ---
print(desc_stats(data$Sys_T2))
        N   Moyenne        SD       Min       Max 
  4.00000 114.50000  13.69915 102.00000 130.00000 
cat("\n--- Statistiques descriptives Dia_T1 ---\n")

--- Statistiques descriptives Dia_T1 ---
print(desc_stats(data$Dia_T1))
       N  Moyenne       SD      Min      Max 
 4.00000 71.75000 14.52297 55.00000 90.00000 
cat("\n--- Statistiques descriptives Dia_T2 ---\n")

--- Statistiques descriptives Dia_T2 ---
print(desc_stats(data$Dia_T2))
        N   Moyenne        SD       Min       Max 
 4.000000 66.500000  9.146948 60.000000 80.000000 
data$Diff_VO2 <- data$VO2_T2 - data$VO2_T1
data$Diff_Sys <- data$Sys_T2 - data$Sys_T1
data$Diff_Dia <- data$Dia_T2 - data$Dia_T1

cat("\n--- Différences individuelles VO2 ---\n")

--- Différences individuelles VO2 ---
print(data[, c("Participant", "VO2_T1", "VO2_T2", "Diff_VO2")])
  Participant VO2_T1 VO2_T2 Diff_VO2
1      OLS001 36.853 43.267    6.414
2      OLS002 42.610 42.610    0.000
3      OLS003 39.958 46.219    6.261
4      OLS004 37.663 44.113    6.450
cat("\n--- Différences individuelles Systolique ---\n")

--- Différences individuelles Systolique ---
print(data[, c("Participant", "Sys_T1", "Sys_T2", "Diff_Sys")])
  Participant Sys_T1 Sys_T2 Diff_Sys
1      OLS001    126    122       -4
2      OLS002    122    102      -20
3      OLS003    105    104       -1
4      OLS004    130    130        0
cat("\n--- Différences individuelles Diastolique ---\n")

--- Différences individuelles Diastolique ---
print(data[, c("Participant", "Dia_T1", "Dia_T2", "Diff_Dia")])
  Participant Dia_T1 Dia_T2 Diff_Dia
1      OLS001     90     80      -10
2      OLS002     74     62      -12
3      OLS003     55     64        9
4      OLS004     68     60       -8

Test de wilcoxon apparié

cat("\n--- Wilcoxon apparié VO2 ---\n")

--- Wilcoxon apparié VO2 ---
w_vo2 <- wilcox.test(data$VO2_T1, data$VO2_T2, paired = TRUE, exact = FALSE)
print(w_vo2)

    Wilcoxon signed rank test with continuity correction

data:  data$VO2_T1 and data$VO2_T2
V = 0, p-value = 0.1814
alternative hypothesis: true location shift is not equal to 0
cat("\n--- Wilcoxon apparié Systolique ---\n")

--- Wilcoxon apparié Systolique ---
w_sys <- wilcox.test(data$Sys_T1, data$Sys_T2, paired = TRUE, exact = FALSE)
print(w_sys)

    Wilcoxon signed rank test with continuity correction

data:  data$Sys_T1 and data$Sys_T2
V = 6, p-value = 0.1814
alternative hypothesis: true location shift is not equal to 0
cat("\n--- Wilcoxon apparié Diastolique ---\n")

--- Wilcoxon apparié Diastolique ---
w_dia <- wilcox.test(data$Dia_T1, data$Dia_T2, paired = TRUE, exact = FALSE)
print(w_dia)

    Wilcoxon signed rank test with continuity correction

data:  data$Dia_T1 and data$Dia_T2
V = 8, p-value = 0.3613
alternative hypothesis: true location shift is not equal to 0

graphique

matplot(
  x = c(1, 2),
  y = t(as.matrix(data[, c("VO2_T1", "VO2_T2")])),
  type = "b",
  pch = 19,
  lty = 1,
  xaxt = "n",
  xlab = "Temps",
  ylab = expression("VO"[2] * " max (ml·kg"^{-1} * "·min"^{-1} * ")"),
  main = expression("Évolution du VO"[2] * " max entre T1 et T2")
)
axis(1, at = c(1, 2), labels = c("Terme 1", "Terme 2"))
legend("bottomright", legend = data$Participant, col = 1:4, lty = 1, pch = 19, bty = "n")

matplot(
  x = c(1, 2),
  y = t(as.matrix(data[, c("Sys_T1", "Sys_T2")])),
  type = "b",
  pch = 19,
  lty = 1,
  xaxt = "n",
  xlab = "Temps",
  ylab = "Pression systolique (mmHg)",
  main = "Évolution de la pression systolique entre T1 et T2"
)
axis(1, at = c(1, 2), labels = c("Terme 1", "Terme 2"))
legend("topright", legend = data$Participant, col = 1:4, lty = 1, pch = 19, bty = "n")

matplot(
  x = c(1, 2),
  y = t(as.matrix(data[, c("Dia_T1", "Dia_T2")])),
  type = "b",
  pch = 19,
  lty = 1,
  xaxt = "n",
  xlab = "Temps",
  ylab = "Pression diastolique (mmHg)",
  main = "Évolution de la pression diastolique entre T1 et T2"
)
axis(1, at = c(1, 2), labels = c("Terme 1", "Terme 2"))
legend("topright", legend = data$Participant, col = 1:4, lty = 1, pch = 19, bty = "n")

matplot(
  x = c(1, 2),
  y = t(as.matrix(data[, c("RHR_T1", "RHR_T2")])),
  type = "b",
  pch = 19,
  lty = 1,
  xaxt = "n",
  xlab = "Temps",
  ylab = expression("RHR"),
  main = expression("Rythme cardiaque au repos" * " entre T1 et T2")
)
axis(1, at = c(1, 2), labels = c("Terme 1", "Terme 2"))
legend("bottomright", legend = data$Participant, col = 1:4, lty = 1, pch = 19, bty = "n")

matplot(
  x = c(1, 2),
  y = t(as.matrix(data[, c("HGL_T1", "HGL_T2")])),
  type = "b",
  pch = 19,
  lty = 1,
  xaxt = "n",
  xlab = "Temps",
  ylab = expression("HGL"),
  main = expression("Évolution du HGL" * " entre T1 et T2")
)
axis(1, at = c(1, 2), labels = c("Terme 1", "Terme 2"))
legend("bottomright", legend = data$Participant, col = 1:4, lty = 1, pch = 19, bty = "n")

matplot(
  x = c(1, 2),
  y = t(as.matrix(data[, c("HGR_T1", "HGR_T2")])),
  type = "b",
  pch = 19,
  lty = 1,
  xaxt = "n",
  xlab = "Temps",
  ylab = expression("HGR"),
  main = expression("Évolution du HGR" * " entre T1 et T2")
)
axis(1, at = c(1, 2), labels = c("Terme 1", "Terme 2"))
legend("bottomright", legend = data$Participant, col = 1:4, lty = 1, pch = 19, bty = "n")

plot(
  data$Age, data$VO2_T1,
  pch = 19,
  xlab = "Âge (ans)",
  ylab = expression("VO"[2] * " max (ml·kg"^{-1} * "·min"^{-1} * ")"),
  main = expression("Relation entre l'âge et le VO"[2] * " max (Terme 1)")
)
text(data$Age, data$VO2_T1, labels = data$Participant, pos = 2, cex = 0.8)

plot(
  data$Age, data$VO2_T2,
  pch = 19,
  xlab = "Âge (ans)",
  ylab = expression("VO"[2] * " max (ml·kg"^{-1} * "·min"^{-1} * ")"),
  main = expression("Relation entre l'âge et le VO"[2] * " max (Terme 2)")
)
text(data$Age, data$VO2_T2, labels = data$Participant, pos = 2, cex = 0.8)

plot(
  data$RHR_T1, data$VO2_T1,
  pch = 19,
  xlab = "Rythme cardiaque au repos (bpm)",
  ylab = expression("VO"[2] * " max (ml·kg"^{-1} * "·min"^{-1} * ")"),
  main = expression("Relation entre le rythme cardiaque au repos et le VO"[2] * " max (Terme 1)")
)
text(data$RHR_T1, data$VO2_T1, labels = data$Participant, pos = 2, cex = 0.8)

plot(
  data$RHR_T2, data$VO2_T2,
  pch = 19,
  xlab = "Rythme cardiaque au repos (bpm)",
  ylab = expression("VO"[2] * " max (ml·kg"^{-1} * "·min"^{-1} * ")"),
  main = expression("Relation entre le rythme cardiaque au repos et le VO"[2] * " max (Terme 2)")
)
text(data$RHR_T2, data$VO2_T2, labels = data$Participant, pos = 2, cex = 0.8)

```