From 7e60ad71e247fc58222bf3e9537b8130d7150b6d Mon Sep 17 00:00:00 2001 From: Pe Date: Mon, 23 Mar 2020 15:33:06 +0100 Subject: [PATCH] =?UTF-8?q?ajout=20de=20la=20fonction=20round=20pour=20arr?= =?UTF-8?q?ondir=20=C3=A0=202=20chiffres=20signicatifs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module2/exo2/exercice_fr.Rmd | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/module2/exo2/exercice_fr.Rmd b/module2/exo2/exercice_fr.Rmd index a149d4c..3eec465 100644 --- a/module2/exo2/exercice_fr.Rmd +++ b/module2/exo2/exercice_fr.Rmd @@ -18,9 +18,9 @@ liste = c(14.0, 7.6, 11.2, 12.8, 12.5, 9.9, 14.9, 9.4, 16.9, 10.2, 14.9, 18.1, 7 1. Quelle est la moyenne ? ```{r} -mean(liste) +round(mean(liste), 2) ``` - +La fonction round(x, digits =2) permet d'afficher 2 chiffres significatifs 2. Quel est le minimum ? ```{r} min(liste) @@ -38,8 +38,9 @@ median(liste) 5. Quel est l'écart-type ? ```{r} -sd(liste) +round(sd(liste),2) ``` + -- 2.18.1