|
20 | 20 | #' @param select_time select the observation (ob) using time from model (mo) data.frame |
21 | 21 | #' @param time name of the time column (containing time in POSIXct) |
22 | 22 | #' @param remove_ch remove special characters on column names |
| 23 | +#' @param clean remove rows when number of observations < nobs, for site="complete" |
23 | 24 | #' @param verbose display additional information |
24 | 25 | #' @param ... arguments to be passing to stats and plot |
25 | 26 | #' |
@@ -86,7 +87,7 @@ eva <- function(mo, ob, rname = site, table = NULL, |
86 | 87 | site = 'ALL', wd = FALSE, fair = NULL, |
87 | 88 | cutoff = NA, cutoff_NME = NA, no_tz = FALSE, |
88 | 89 | nobs = 8, eval_function = stat, select_time, |
89 | | - time = 'date', remove_ch = FALSE, |
| 90 | + time = 'date', remove_ch = FALSE, clean = TRUE, |
90 | 91 | verbose = TRUE, ...){ |
91 | 92 |
|
92 | 93 | if(!is.data.frame(mo)) |
@@ -123,6 +124,7 @@ eva <- function(mo, ob, rname = site, table = NULL, |
123 | 124 | RESULT <- eva(mo = mo, ob = ob,table = RESULT, site = s, ... ) # nocov |
124 | 125 | } # nocov |
125 | 126 | RESULT <- eva(mo = mo, ob = ob,table = RESULT, site = 'ALL', ... ) # nocov |
| 127 | + if(clean) RESULT <- RESULT[ RESULT$n > nobs, ] # nocov |
126 | 128 | return(RESULT) # nocov |
127 | 129 | } |
128 | 130 |
|
|
0 commit comments