Commit d4e4aec4 authored by Léa Chevalier's avatar Léa Chevalier

vvv

parent 6d50bed9
......@@ -42,7 +42,6 @@ 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()
```
Maintenant, à vous de jouer! Vous pouvez effacer toutes ces informations et les remplacer par votre document computationnel.
Il est alors aisé d'obteni une approximation (pas terrible) de $\pi en comptant combien de fois, en moyen ***X²+Y²*** est inférieur à 1:
```{r cars}
4*mean(df$Accept)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment