Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Sampling strategies in dfe
sampling strategies in dfe
Commits
0eb71884
Commit
0eb71884
authored
Aug 13, 2021
by
linushof
Browse files
Checksums for simulation data
parent
de40914e
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/prepare_choice_data.R
View file @
0eb71884
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
%>%
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment