From faa74ccd90c433a577aca2a983fdb0dfc6415541 Mon Sep 17 00:00:00 2001 From: ddurden Date: Wed, 9 Nov 2022 19:56:01 +0000 Subject: [PATCH] - updating time removal at beginning of measurements for isoCo2 and correcting total time for qfqm and ucrt --- pack/eddy4R.qaqc/R/wrap.dp01.qfqm.ecse.R | 8 ++++---- pack/eddy4R.stor/R/wrap.dp01.ecse.R | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pack/eddy4R.qaqc/R/wrap.dp01.qfqm.ecse.R b/pack/eddy4R.qaqc/R/wrap.dp01.qfqm.ecse.R index 23be24be..418fd5b1 100644 --- a/pack/eddy4R.qaqc/R/wrap.dp01.qfqm.ecse.R +++ b/pack/eddy4R.qaqc/R/wrap.dp01.qfqm.ecse.R @@ -721,7 +721,7 @@ wrap.dp01.qfqm.ecse <- function( #if there is at least one measurement if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ #determine the index of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #replace last idxEnd > 86400 by 86400 @@ -808,7 +808,7 @@ wrap.dp01.qfqm.ecse <- function( if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ #determine the index of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #if last timeEnd is NA, replce that time to the last time value in data$time @@ -909,7 +909,7 @@ wrap.dp01.qfqm.ecse <- function( #if there is at least one measurement if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ #determine the end time of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #if last timeEnd is NA, replce that time to the last time value in data$time @@ -999,7 +999,7 @@ wrap.dp01.qfqm.ecse <- function( #if there is at least one measurement if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ # #determine the end time of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #if last timeEnd is NA, replce that time to the last time value in data$time diff --git a/pack/eddy4R.stor/R/wrap.dp01.ecse.R b/pack/eddy4R.stor/R/wrap.dp01.ecse.R index f226663d..0bbd1832 100644 --- a/pack/eddy4R.stor/R/wrap.dp01.ecse.R +++ b/pack/eddy4R.stor/R/wrap.dp01.ecse.R @@ -730,7 +730,7 @@ wrap.dp01.ecse <- function( if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ #determine the index of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #if last timeEnd is NA, replce that time to the last time value in data$time @@ -840,7 +840,7 @@ wrap.dp01.ecse <- function( #if there is at least one measurement if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ #determine the end time of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #if last timeEnd is NA, replce that time to the last time value in data$time @@ -918,7 +918,7 @@ wrap.dp01.ecse <- function( #if there is at least one measurement if(length(which(!is.na(wrk$qfqm$crdCo2$qfRngTemp))) > 0){ # #determine the end time of each measurement - wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 60) + wrk$idx <- eddy4R.base::def.idx.agr(time = data$time, PrdAgr = (PrdMeas*60), FreqLoca = 1, MethIdx = "specBgn", data = wrk$qfqm$crdCo2$qfRngTemp, CritTime = 240) #delete row if last timeBgn and timeEnd is NA wrk$idx <- wrk$idx[rowSums(is.na(wrk$idx)) != 2,] #if last timeEnd is NA, replce that time to the last time value in data$time