From 4e7dc0c006f6b60a9a1bfe30221740a3dc27e22a Mon Sep 17 00:00:00 2001 From: Laura Date: Tue, 11 Aug 2020 14:54:02 -0500 Subject: [PATCH] Ignore na's for stats --- R/kalman_bootstrapping.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/kalman_bootstrapping.R b/R/kalman_bootstrapping.R index 03c5654..d440552 100644 --- a/R/kalman_bootstrapping.R +++ b/R/kalman_bootstrapping.R @@ -86,8 +86,8 @@ makeMonths <- function(dailyBootOut, eList){ monthFluxPcts <- matrix(data = NA, nrow = nMonths, ncol = 11) monthConcPcts <- matrix(data = NA, nrow = nMonths, ncol = 11) for(iMonth in 1:nMonths){ - monthFluxPcts[iMonth,] <- quantile(monthsFlux[iMonth,], probs = probs, type = 6) - monthConcPcts[iMonth,] <- quantile(monthsConc[iMonth,], probs = probs, type = 6) + monthFluxPcts[iMonth,] <- quantile(monthsFlux[iMonth,], probs = probs, type = 6, na.rm = TRUE) + monthConcPcts[iMonth,] <- quantile(monthsConc[iMonth,], probs = probs, type = 6, na.rm = TRUE) } monthPcts <- list(monthFluxPcts = monthFluxPcts, monthConcPcts = monthConcPcts,