| |
| R version 3.6.2 Patched (2020-02-12 r77795) -- "Dark and Stormy Night" |
| Copyright (C) 2020 The R Foundation for Statistical Computing |
| Platform: x86_64-pc-linux-gnu (64-bit) |
| |
| R is free software and comes with ABSOLUTELY NO WARRANTY. |
| You are welcome to redistribute it under certain conditions. |
| Type 'license()' or 'licence()' for distribution details. |
| |
| R is a collaborative project with many contributors. |
| Type 'contributors()' for more information and |
| 'citation()' on how to cite R or R packages in publications. |
| |
| Type 'demo()' for some demos, 'help()' for on-line help, or |
| 'help.start()' for an HTML browser interface to help. |
| Type 'q()' to quit R. |
| |
| > ### Sanity checks for some of the Jan 2017 breakage. |
| > |
| > options(digits = 5) |
| > |
| > ## UCV, BCV and SJ all gave wrong answers in example(bw.ucv) |
| > c(nrd0 = bw.nrd0(precip), nrd = bw.nrd(precip), |
| + ucv = bw.ucv(precip), bcv = bw.bcv(precip), |
| + "SJ-dpi" = bw.SJ(precip, method = "dpi"), |
| + "SJ-ste" = bw.SJ(precip, method = "ste")) |
| nrd0 nrd ucv bcv SJ-dpi SJ-ste |
| 3.8479 4.5320 4.8619 6.6808 4.0220 3.9318 |
| Warning message: |
| In bw.bcv(precip) : minimum occurred at one end of the range |
| > |
| > ## wrong answers/errors in R < 3.3.3 for largish datasets |
| > set.seed(1); bw.bcv(rnorm(6000)) |
| [1] 0.18471 |
| > set.seed(1); x <- rnorm(47000) |
| > bw.ucv(x); bw.SJ(x, method = "dpi"); bw.SJ(x, method = "ste") |
| [1] 0.047906 |
| [1] 0.12257 |
| [1] 0.12282 |
| > |
| > ## An extremely unbalanced example where counts exceed INT_MAX |
| > ## Prior to R 3.4.0 was slow as O(n^2) |
| > set.seed(1); bw.SJ(c(runif(65537), 1e7)) |
| [1] 6.4053e-05 |
| > |
| > |
| > proc.time() |
| user system elapsed |
| 0.186 0.045 0.206 |