diff --git a/td4_mon_script.R b/td4_mon_script.R deleted file mode 100644 index 870ef7b..0000000 --- a/td4_mon_script.R +++ /dev/null @@ -1,51 +0,0 @@ -# ============================================================================== -# TD4 : le prix a la pompe suit-il le prix du petrole ? -# ============================================================================== - - -# Packages ---- -# Si une ligne library() renvoie une erreur, executez une seule fois la ligne -# install.packages() (sans le #), puis relancez les library(). -# install.packages(c("dplyr", "tidyr", "ggplot2")) -library(dplyr) -library(tidyr) -library(ggplot2) - - -# Charger les donnees ---- -# chemin : le dossier td4, qui contient les deux fichiers de donnees. -# Gardez UNE des deux lignes (mettez un # devant l'autre) : -# - avec un projet ouvert sur votre dossier du cours, le chemin part du projet -chemin <- "td4" -# - sans projet, le chemin complet du dossier td4, a adapter (des /, pas des \) -# chemin <- "W:/Documents/TD_R_2026/td4" - -file.exists(file.path(chemin, "carburants_hebdo.csv")) # doit afficher TRUE -hebdo <- read.csv(file.path(chemin, "carburants_hebdo.csv")) -petrole <- read.csv(file.path(chemin, "petrole_mensuel.csv")) - - -# Etape 1 : inspecter (boite a outils : outil 0) ---- - - - -# Etape 2 : les dates (boite a outils : outil 1) ---- - - - -# Etape 3 : passer au mois (boite a outils : outil 2) ---- - - - -# Etape 4 : joindre les deux tables (boite a outils : outil 3) ---- - - - -# Etape 5, pour la question 2 : decomposer le prix du gazole (boite a outils : outil 4) ---- - - - -# Votre figure (boite a outils : outils 6 a 8) ---- -# Facultatif, pour l'enregistrer dans le dossier td4 : -# ggsave(file.path(chemin, "td4_question1.png"), figure, width = 8, height = 5, dpi = 150) -