From dc46c7bce7a9483d2cb80566fe04f1897835ad6e Mon Sep 17 00:00:00 2001 From: JetteReeg <47744741+JetteReeg@users.noreply.github.com> Date: Wed, 27 Mar 2019 13:52:04 +0100 Subject: [PATCH] --- R-files/SimulationSpecificSettings.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R-files/SimulationSpecificSettings.R b/R-files/SimulationSpecificSettings.R index 43fd079b..18e36d31 100644 --- a/R-files/SimulationSpecificSettings.R +++ b/R-files/SimulationSpecificSettings.R @@ -819,13 +819,13 @@ Please wait while simulations are running. for (file in file_list){ if (!exists("PFT")){ # save also MC run ID - MCtmp <- unlist(strsplit(file, "_"))[7] + MCtmp <- unlist(strsplit(file, "_"))[8] MC <- unlist(strsplit(MCtmp, ".txt")) temp <- fread(file, sep="\t") temp[,MC:=MC] PFT<-temp } else { - MCtmp <- unlist(strsplit(file, "_"))[7] + MCtmp <- unlist(strsplit(file, "_"))[8] MC <- unlist(strsplit(MCtmp, ".txt")) temp <- fread(file, sep="\t") temp[,MC:=MC] @@ -853,7 +853,7 @@ Please wait while simulations are running. file_list <- list.files(pattern="Grd__*") for (file in file_list){ if (!exists("GRD")){ - MCtmp <- unlist(strsplit(file, "_"))[7] + MCtmp <- unlist(strsplit(file, "_"))[8] MC <- unlist(strsplit(MCtmp, ".txt")) temp <- fread(file, sep="\t") temp[,MC:=MC] @@ -861,7 +861,7 @@ Please wait while simulations are running. } # if the merged dataset does exist, append to it else { - MCtmp <- unlist(strsplit(file, "_"))[7] + MCtmp <- unlist(strsplit(file, "_"))[8] MC <- unlist(strsplit(MCtmp, ".txt")) temp <- fread(file, sep="\t") temp[,MC:=MC]