Skip to content
Snippets Groups Projects
Commit 9efc3933 authored by mpotterf's avatar mpotterf
Browse files

removed first_load true as the script should be used just once, no need for further specifications

parent 68b94f18
No related branches found
No related tags found
No related merge requests found
...@@ -114,25 +114,31 @@ db_names <- gsub(".db", "", db_input) ...@@ -114,25 +114,31 @@ db_names <- gsub(".db", "", db_input)
first_load = FALSE first_load = FALSE
if (sim_variant %in% all.variants ){
print("YES")
} else {
print("NO")
}
### the following lines do not need any changes ### ### the following lines do not need any changes ###
if(first_load == TRUE){
# If one of the follwing simulation variants is read ...
if(sim_variant %in% all.variants ) { # If one of the follwing simulation variants is read ...
if(sim_variant %in% all.variants ) {
print("sim_varian is in all variants")
# Run the script with the SQL query for all management regimes # Run the script with the SQL query for all management regimes
source(paste0(path, "/structure_SIMO_rslDB_FBE.R")) source(paste0(path, "/structure_SIMO_rslDB_FBE.R"))
} else { } else {
print("!!!else")
# Otherwise, run the script witht the SQL query for Set aside without deadwood extraction (...SA) # Otherwise, run the script witht the SQL query for Set aside without deadwood extraction (...SA)
# This needs a different SQL query, since the database does not contain harvest information # This needs a different SQL query, since the database does not contain harvest information
source(paste0(path, "/structure_SIMO_rslDB_SA.R")) # Query source(paste0(path, "/structure_SIMO_rslDB_SA.R")) # Query
}
} }
### ###
...@@ -153,6 +159,7 @@ columns <- paste0("id, ...@@ -153,6 +159,7 @@ columns <- paste0("id,
BA, BA,
V, V,
N, N,
SC,
H_dom, H_dom,
D_gm, D_gm,
Harvested_V, Harvested_V,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment