--- title: "Module 2 Exo 3" author: "Votre nom" date: "septembre" output: pdf_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) library("ggplot2") ``` On récupère les données pré traitées de l'exo 2. ```{r load} data <- read.csv("../exo2/data.csv", header = FALSE) head(data) ``` On ajoute un index. ```{r pre} data$index <- seq.int(nrow(data)) ``` On trace le *sequence plot*. ```{r seq} ggplot(data = data) + geom_line(mapping = aes(x = index, y = V1), color = "blue") + theme_bw() ``` On trace l'histogramme. ```{r bar} ggplot(data = data) + geom_histogram( mapping = aes(x = V1), fill = "blue", color="black", binwidth = 2 ) + theme_bw() ``` Je suis pas arrivé à reproduire exactement les mêmes *bins*. :/