From f9cbcfa3b0da4620fbcc31a868c1ded577990686 Mon Sep 17 00:00:00 2001 From: Hadrien Salat Date: Mon, 19 Feb 2024 16:17:25 +0000 Subject: [PATCH] Add R notebook for data exploration --- notebooks/R/.gitignore | 5 +++++ notebooks/R/main.R | 10 ++++++++++ 2 files changed, 15 insertions(+) create mode 100644 notebooks/R/.gitignore create mode 100644 notebooks/R/main.R diff --git a/notebooks/R/.gitignore b/notebooks/R/.gitignore new file mode 100644 index 0000000..f8b1541 --- /dev/null +++ b/notebooks/R/.gitignore @@ -0,0 +1,5 @@ +data/ +.Rhistory +.RData +R.Rproj +.Rproj.user/ diff --git a/notebooks/R/main.R b/notebooks/R/main.R new file mode 100644 index 0000000..b12ec5d --- /dev/null +++ b/notebooks/R/main.R @@ -0,0 +1,10 @@ +folderIn <- "data" + +readNTS <- function(name,folderIn = "data"){ + data <- read.table(file.path(folderIn,"UKDA-5340-tab","tab",paste0(name,"_eul_2002-2022.tab")), sep="\t", header=TRUE) + return(data) +} + +NTS <- readNTS("individual",folderIn) +stage <- readNTS("stage",folderIn) +trip <- readNTS("trip",folderIn) \ No newline at end of file