Commit 0eb71884 authored by linushof's avatar linushof
Browse files

Checksums for simulation data

parent de40914e
pacman::p_load(tidyverse)
pacman::p_load(tidyverse, digest)
# load simulation data
cols <- list(.default = col_double(),
......@@ -13,6 +13,13 @@ sim_comprehensive <- read_csv("data/simulation/sim_comprehensive.csv", col_types
# piecewise strategy
## use hash to validate simulation data
hash_piecewise <- digest(sim_piecewise, "md5")
if(hash_piecewise != "295e1a7b23402dd50a1dae5a54141f78"){
warning("Mismatch between original and current data!\nCurrent hash is:\n '", hash_piecewise, "'")
}
## transform data to obtain trial summaries
choices_piecewise <- sim_piecewise %>%
......@@ -36,6 +43,13 @@ write_csv(choices_piecewise, "data/choices/choices_piecewise.csv")
# comprehensive strategy
## use hash to validate simulation data
hash_comprehensive <- digest(sim_comprehensive, "md5")
if(hash_comprehensive != "6e62f9cbeebbabcebae86188d72426ab"){
warning("Mismatch between original and current data!\nCurrent hash is:\n '", hash_comprehensive, "'")
}
## transform data to obtain trial summaries
choices_comprehensive <- sim_comprehensive %>%
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment