Skip to content

Commit a245857

Browse files
committed
added clean option in eva()
1 parent 54cc6c8 commit a245857

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

R/eva.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#' @param select_time select the observation (ob) using time from model (mo) data.frame
2121
#' @param time name of the time column (containing time in POSIXct)
2222
#' @param remove_ch remove special characters on column names
23+
#' @param clean remove rows when number of observations < nobs, for site="complete"
2324
#' @param verbose display additional information
2425
#' @param ... arguments to be passing to stats and plot
2526
#'
@@ -86,7 +87,7 @@ eva <- function(mo, ob, rname = site, table = NULL,
8687
site = 'ALL', wd = FALSE, fair = NULL,
8788
cutoff = NA, cutoff_NME = NA, no_tz = FALSE,
8889
nobs = 8, eval_function = stat, select_time,
89-
time = 'date', remove_ch = FALSE,
90+
time = 'date', remove_ch = FALSE, clean = TRUE,
9091
verbose = TRUE, ...){
9192

9293
if(!is.data.frame(mo))
@@ -123,6 +124,7 @@ eva <- function(mo, ob, rname = site, table = NULL,
123124
RESULT <- eva(mo = mo, ob = ob,table = RESULT, site = s, ... ) # nocov
124125
} # nocov
125126
RESULT <- eva(mo = mo, ob = ob,table = RESULT, site = 'ALL', ... ) # nocov
127+
if(clean) RESULT <- RESULT[ RESULT$n > nobs, ] # nocov
126128
return(RESULT) # nocov
127129
}
128130

man/eva.Rd

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)