Explorar el Código

Script files

master
Maxime Wack hace 7 años
padre
commit
a2a35b9fc0
Se han modificado 5 ficheros con 79 adiciones y 0 borrados
  1. +9
    -0
      01_Import.R
  2. +14
    -0
      02_Tidy.R
  3. +13
    -0
      03_Transform.R
  4. +20
    -0
      04_Analyse.R
  5. +23
    -0
      Rmd/report.Rmd

+ 9
- 0
01_Import.R Ver fichero

@@ -0,0 +1,9 @@
library(tidyverse)
#library(readxl)
#library(haven)
#library(rvest)
#library(sonlite)

# Import the raw data in csv ----
read_ ("Data/Raw/") %>%
write.csv("Data/.csv", row.names = F)

+ 14
- 0
02_Tidy.R Ver fichero

@@ -0,0 +1,14 @@
library(tidyverse)
# library(lubridate)
# library(stringr)
# library(forcats)

# Load the csv data and tidy it ----
read_csv("Data/.csv") %>%
select() %>%
filter() %>%
mutate() %>%
dmap_if(is.character, factor) -> df

# Save the tidy-ed data ----
save(df, file = "tidy.Rdata")

+ 13
- 0
03_Transform.R Ver fichero

@@ -0,0 +1,13 @@
library(tidyverse)
# library(lubridate)
# library(stringr)
# library(forcats)

# Load the tidy-ed data ----
load("tidy.Rdata")

df %>%


# Save the transformed data ----
save(df, "transformed.Rdata")

+ 20
- 0
04_Analyse.R Ver fichero

@@ -0,0 +1,20 @@
library(tidyverse)
# library(broom)
# library(modelr)

# Load the transformed data ----
load("transformed.Rdata")

# Initialize an empty list to store the results ----
results <- list()

# Specific transformations ----

# Models ----

# Tables ----

# Plots ----

# Save the results object ----
save(results, file = "results.Rdata")

+ 23
- 0
Rmd/report.Rmd Ver fichero

@@ -0,0 +1,23 @@
---
title:
author:
date:
output:
_document:
---

```{r init, echo = F, message = F, warning = F}
library(tidyverse)
library(knitr)
#library(rmarkdown)
#library(pander)
#library(DT)

load("../results.Rdata")

opts_chunk$set(echo = F,
message = F,
warning = F,
error = F)
```


Cargando…
Cancelar
Guardar