From c9634fe3fb130bdeb5e5f3973de94b4e2d391d2b Mon Sep 17 00:00:00 2001 From: fun-MOOC-ed Date: Mon, 17 Aug 2020 16:13:11 +0200 Subject: [PATCH] =?UTF-8?q?exercice=20corrig=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module3/exo1/analyse-syndrome-grippal.Rmd | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/module3/exo1/analyse-syndrome-grippal.Rmd b/module3/exo1/analyse-syndrome-grippal.Rmd index ada3f88..5e5ca9d 100644 --- a/module3/exo1/analyse-syndrome-grippal.Rmd +++ b/module3/exo1/analyse-syndrome-grippal.Rmd @@ -2,11 +2,11 @@ title: "Analyse de l'incidence du syndrôme grippal" author: "Konrad Hinsen" output: + pdf_document: + toc: true html_document: toc: true theme: journal - pdf_document: - toc: true documentclass: article classoption: a4paper header-includes: @@ -44,12 +44,14 @@ Voici l'explication des colonnes donnée sur le [sur le site d'origine](https:// La première ligne du fichier CSV est un commentaire, que nous ignorons en précisant `skip=1`. ### Téléchargement ```{r} -if (!file.exists("incidence-PAY-3.csv")) -download.file(url = data_url, destfile = "incidence-PAY-3.csv") +data_file = "syndrome-grippal.csv" +if (!file.exists(data_file)) { + download.file(data_url, data_file, method="auto") +} ``` ```{r} -data = read.csv("incidence-PAY-3.csv", skip=1) +data = read.csv(data_file, skip=1) ``` Regardons ce que nous avons obtenu: -- 2.18.1