diff --git a/R/range.filter.R b/R/range.filter.R index 7c30f57..79a588e 100644 --- a/R/range.filter.R +++ b/R/range.filter.R @@ -49,7 +49,7 @@ ccTable$methods( filter.ranges = function(select='red') { rgnum <- list('red'=1, 'amber'=2, 'green'=3) inselectrange <- function(x, ...) { - x > rgnum[[select]] + x >= rgnum[[select]] } if(is.null(.self$dquality$range) || diff --git a/example/clean_data.r b/example/clean_data.r index 81d2697..78af3f3 100644 --- a/example/clean_data.r +++ b/example/clean_data.r @@ -5,14 +5,14 @@ if (!exists("ccd_delta_num")) load('../data/delta_num.Rdata') ccd <- ccd_delta_num -dt.sofa <- ccTable(conf=yaml.load_file('tests/data/test_sofa.yml'), record=ccd) -# create table with all selected items in yaml conf with cadance of 1 hour. +dt.sofa <- ccTable(conf=yaml.load_file('tests/data/ANALYSIS_REF.yaml'), record=ccd) dt.sofa$create.table(freq=1) #dt.sofa$filter.nodata() dt.sofa$filter.ranges() -dt.sofa$filter.category() -dt.sofa$filter.missingness() -dt.sofa$apply.filters() +#dt.sofa$filter.category() +#dt.sofa$filter.missingness() +#dt.sofa$filter.nodata() +#dt.sofa$apply.filters() # imputation - substituting missing values #dt.sofa$imputation()