diff --git a/module2/exo5/exo5_en.Rmd b/module2/exo5/exo5_en.Rmd index f9003e3a9de8b87c66b620b3fb5157fc127a4e17..cf5e3b3404e0e2273df12da3f05018d52f74bc53 100644 --- a/module2/exo5/exo5_en.Rmd +++ b/module2/exo5/exo5_en.Rmd @@ -3,6 +3,8 @@ title: "Analysis of the risk of failure of the O-rings on the Challenger shuttle author: "Arnaud Legrand" date: "28 juin 2018" output: html_document +editor_options: + chunk_output_type: console --- On January 27, 1986, the day before the takeoff of the shuttle _Challenger_, had @@ -26,7 +28,7 @@ Challenger. We start by loading this data: ```{r} -data = read.csv("shuttle.csv",header=T) +data = read.csv(here::here("module2", "exo5", "shuttle.csv"), header=T) data ``` @@ -52,6 +54,7 @@ simplify the analysis. How does the frequency of failure vary with temperature? ```{r} plot(data=data, Malfunction/Count ~ Temperature, ylim=c(0,1)) +plot(data=data, Malfunction/Count ~ Pressure, ylim=c(0,1)) ``` At first glance, the dependence does not look very important, but let's try to @@ -97,7 +100,7 @@ O-rings. It will be about 0.2, as in the tests where we had a failure of at least one joint. Let's get back to the initial dataset to estimate the probability of failure: ```{r} -data_full = read.csv("shuttle.csv",header=T) +data_full = read.csv(here::here("module2", "exo5", "shuttle.csv"),header=T) sum(data_full$Malfunction)/sum(data_full$Count) ```