From b6dd25708a7e448f8e3a68944d8c5457daa7c959 Mon Sep 17 00:00:00 2001 From: 3a0afacf91c0cf56b72bd72775670cb7 <3a0afacf91c0cf56b72bd72775670cb7@app-learninglab.inria.fr> Date: Thu, 10 Feb 2022 10:59:58 +0000 Subject: [PATCH] Update toy_document_fr.Rmd --- module2/exo1/toy_document_fr.Rmd | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/module2/exo1/toy_document_fr.Rmd b/module2/exo1/toy_document_fr.Rmd index 49d651d..582e8b8 100644 --- a/module2/exo1/toy_document_fr.Rmd +++ b/module2/exo1/toy_document_fr.Rmd @@ -27,4 +27,17 @@ x = runif(N) theta = pi/2*runif(N) R=2/(mean(x+sin(theta)>1)) plot=R +library(ggplot2) +ggplot(R) ``` +>ggplot ne fonctionne pas problème avec FORTITUDE? + +```{r} +set.seed(42) +N = 1000 +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() +``` +>Ce code fonctionne.. \ No newline at end of file -- 2.18.1