Ver código fonte

Use RDS files for storage and put them in Data/

master
Maxime Wack 7 anos atrás
pai
commit
e0d0a0215e
3 arquivos alterados com 9 adições e 12 exclusões
  1. +2
    -3
      02_Tidy.R
  2. +3
    -5
      03_Transform.R
  3. +4
    -4
      04_Analyse.R

+ 2
- 3
02_Tidy.R Ver arquivo

@@ -8,7 +8,6 @@ read_csv("Data/.csv") %>%
select() %>%
filter() %>%
mutate() %>%
dmap_if(is.character, factor) -> df

dmap_if(is.character, factor) %>%
# Save the tidy-ed data ----
save(df, file = "tidy.Rdata")
saveRDS(file = "Data/tidy.rds")

+ 3
- 5
03_Transform.R Ver arquivo

@@ -4,10 +4,8 @@ library(tidyverse)
# library(forcats)

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

df %>%

readRDS("Data/tidy.rds") %>%
# Transform the data

# Save the transformed data ----
save(df, "transformed.Rdata")
saveRDS("Data/transformed.rds")

+ 4
- 4
04_Analyse.R Ver arquivo

@@ -2,12 +2,12 @@ library(tidyverse)
# library(broom)
# library(modelr)

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

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

# Load the transformed data ----
readRDS("Data/transformed.rds") -> df

# Specific transformations ----

# Models ----
@@ -17,4 +17,4 @@ results <- list()
# Plots ----

# Save the results object ----
save(results, file = "results.Rdata")
saveRDS(results, file = "Data/results.rds")

Carregando…
Cancelar
Salvar