From 43e31734c79c1b9cb49c09c778a2fc4c7c8bf19c Mon Sep 17 00:00:00 2001
From: dj44vuri <julian.sagebiel@idiv.de>
Date: Thu, 14 Dec 2023 20:07:49 +0100
Subject: [PATCH] small integrations into functions

---
 Projects/CSA/parameters_csa.R     | 2 +-
 Projects/Rbook/parameters_Rbook.R | 2 +-
 functions.R                       | 4 +++-
 simulation_output.rmd             | 4 +---
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/Projects/CSA/parameters_csa.R b/Projects/CSA/parameters_csa.R
index c2e314f..59d2998 100644
--- a/Projects/CSA/parameters_csa.R
+++ b/Projects/CSA/parameters_csa.R
@@ -7,7 +7,7 @@ designpath<- "Projects/CSA/Designs/"
 notes <- "No Heuristics, price logarithmized after recoded to original level. methane continious"
 
 resps =240  # number of respondents
-nosim=2000 # number of simulations to run (about 500 is minimum)
+nosim=2 # number of simulations to run (about 500 is minimum)
 
 #betacoefficients should not include "-"
 bx1 =0.1
diff --git a/Projects/Rbook/parameters_Rbook.R b/Projects/Rbook/parameters_Rbook.R
index 78f77f6..0f32bf6 100644
--- a/Projects/Rbook/parameters_Rbook.R
+++ b/Projects/Rbook/parameters_Rbook.R
@@ -7,7 +7,7 @@ designpath<- "Projects/Rbook/Designs/"
 notes <- "No Heuristics"
 
 resps =240  # number of respondents
-nosim=100 # number of simulations to run (about 500 is minimum)
+nosim=2 # number of simulations to run (about 500 is minimum)
 
 #betacoefficients should not include "-"
 bsq=0.00
diff --git a/functions.R b/functions.R
index acc9341..231ffb5 100644
--- a/functions.R
+++ b/functions.R
@@ -1,7 +1,9 @@
 
 sim_all <- function(){
 
- 
+  designfile<-list.files(designpath,full.names = T)
+  designname <- str_remove_all(list.files(designpath,full.names = F),
+                               "(.ngd|_|.RDS)")  ## Make sure designnames to not contain file ending and "_", as the may cause issues when replace
   
 if (!exists("destype")) destype="ngene"
 
diff --git a/simulation_output.rmd b/simulation_output.rmd
index 86c4c76..d310dd0 100644
--- a/simulation_output.rmd
+++ b/simulation_output.rmd
@@ -32,9 +32,7 @@ source(params$file)
 
 
 
-designfile<-list.files(designpath,full.names = T)
-designname <- str_remove_all(list.files(designpath,full.names = F),
-                             "(.ngd|_|.RDS)")  ## Make sure designnames to not contain file ending and "_", as the may cause issues when replace
+
 
 all_designs <- sim_all()
          
-- 
GitLab