v <- c(1.2, 8.7, 5.6, 11.4)
v
[1]  1.2  8.7  5.6 11.4
v <- c(1.2, 8.7, 5.6, 11.4)
v |> 
  mean()
[1] 6.725
v <- c(1.2, 8.7, 5.6, 11.4)
v |> 
  mean() |> 
  round(digits = 1)
[1] 6.7
v <- c(1.2, 8.7, 5.6, 11.4)
v |> 
  mean() |> 
  round(digits = 1) |> 
  format(decimal.mark = ",")
[1] "6,7"
v <- c(1.2, 8.7, 5.6, 11.4)
v |> 
  mean() |> 
  round(digits = 1) |> 
  format(decimal.mark = ",") |> 
  paste0(
    "La moyenne est de ", 
    m = _, 
    "."
  )
[1] "La moyenne est de 6,7."
v <- c(1.2, 8.7, 5.6, 11.4)
v |> 
  mean() |> 
  round(digits = 1) |> 
  format(decimal.mark = ",") |> 
  paste0(
    "La moyenne est de ", 
    m = _, 
    "."
  ) |> 
  message()
La moyenne est de 6,7.