From 24102fe48646ff17a8d3528a3515c6e53e3b39be Mon Sep 17 00:00:00 2001 From: nrennie Date: Tue, 20 Feb 2024 13:50:21 +0000 Subject: [PATCH] add data url --- examples/example_01.R | 4 +++- examples_blank/example_01.R | 4 +++- exercise_solutions/exercise_solutions_01.R | 4 +++- exercises/exercise_01.R | 5 +++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/examples/example_01.R b/examples/example_01.R index 59bf0ce..e2fedb7 100644 --- a/examples/example_01.R +++ b/examples/example_01.R @@ -3,7 +3,9 @@ library(tidyverse) library(mgcv) # Load data -covid <- read_csv("data/covid.csv") +covid <- readr::read_csv( + "https://raw.githubusercontent.com/nrennie/f4sg-gams/main/data/covid.csv" +) # Subset data to look at just GBR gbr_data <- covid |> diff --git a/examples_blank/example_01.R b/examples_blank/example_01.R index 018f278..b7ec3bd 100644 --- a/examples_blank/example_01.R +++ b/examples_blank/example_01.R @@ -2,7 +2,9 @@ # Load data - +covid <- readr::read_csv( + "https://raw.githubusercontent.com/nrennie/f4sg-gams/main/data/covid.csv" +) # Subset data to look at just GBR diff --git a/exercise_solutions/exercise_solutions_01.R b/exercise_solutions/exercise_solutions_01.R index faa45ff..f41cffb 100644 --- a/exercise_solutions/exercise_solutions_01.R +++ b/exercise_solutions/exercise_solutions_01.R @@ -3,7 +3,9 @@ library(tidyverse) library(mgcv) # Load data -covid <- read_csv("data/covid.csv") +covid <- readr::read_csv( + "https://raw.githubusercontent.com/nrennie/f4sg-gams/main/data/covid.csv" +) # Subset data to look at just GBR fra_data <- covid |> diff --git a/exercises/exercise_01.R b/exercises/exercise_01.R index ce34f43..267d18e 100644 --- a/exercises/exercise_01.R +++ b/exercises/exercise_01.R @@ -1,9 +1,10 @@ # Load packages -library(tidyverse) library(mgcv) # Load data -covid <- read_csv("data/covid.csv") +covid <- readr::read_csv( + "https://raw.githubusercontent.com/nrennie/f4sg-gams/main/data/covid.csv" +) # Subset data to look at just FRA