@@ -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) |
@@ -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") |
@@ -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") |
@@ -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") |
@@ -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) | |||||
``` | |||||