diff --git a/module2/exo1/toy_document_en.Rmd b/module2/exo1/toy_document_en.Rmd index 9e7dda048eaa813e6dddef9677065723026c63ab..c121e1328c26023819147a3153d599ef96a1158e 100644 --- a/module2/exo1/toy_document_en.Rmd +++ b/module2/exo1/toy_document_en.Rmd @@ -41,8 +41,9 @@ 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() ``` -It is then straightforward to obtain a (not really good) approximation to $\pi$ by counting how many times, on average, $\X^2 + Y^2$ is smaller than 1 : +It is then straightforward to obtain a (not really good) approximation to $\pi$ by counting how many times, on average, $X^2 + Y^2$ is smaller than 1 : -```4*mean(df$Accept) +```{r} +4*mean(df$Accept) ```