From b0cdfec720b71b509916f364058fc56ad2a116d4 Mon Sep 17 00:00:00 2001 From: 132a56ebe3cea51f193948a5fd52f423 <132a56ebe3cea51f193948a5fd52f423@app-learninglab.inria.fr> Date: Tue, 6 Jun 2023 13:29:58 +0000 Subject: [PATCH] Corrections (sauts de ligne) --- module2/exo1/toy_document_fr.Rmd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/module2/exo1/toy_document_fr.Rmd b/module2/exo1/toy_document_fr.Rmd index fb50af8..5386973 100644 --- a/module2/exo1/toy_document_fr.Rmd +++ b/module2/exo1/toy_document_fr.Rmd @@ -37,6 +37,7 @@ df = data.frame(X = runif(N), Y = runif(N)) df$Accept = (df$X**2 + df$Y**2 <=1) library(ggplot2) ggplot(df, aes(x=X,y=Y,color=Accept)) + geom_point(alpha=.2) + coord_fixed() + theme_bw() + ``` Il est alors aisé d'obtenir une approximation (pas terrible) de $\pi$ en comptant combien de fois, en moyenne, $X^2 + Y^2$ est inférieur à 1 : @@ -44,3 +45,4 @@ Il est alors aisé d'obtenir une approximation (pas terrible) de $\pi$ en compta ```{r} 4*mean(df$Accept) ``` + -- 2.18.1