From a8c6767dd5506e862b54af508b58c2b282c0bec4 Mon Sep 17 00:00:00 2001 From: giovsaraceno Date: Thu, 7 Mar 2024 20:16:12 +0100 Subject: [PATCH] modify test-kb.test --- .Rhistory | 16 +++++++ .Rproj.user/F4975BFA/pcs/source-pane.pper | 2 +- .../F4975BFA/pcs/windowlayoutstate.pper | 4 +- .Rproj.user/F4975BFA/sources/prop/INDEX | 2 + .Rproj.user/shared/notebooks/paths | 6 ++- src/QuadratiK.dll | Bin 17680919 -> 17680919 bytes tests/testthat/test-kb.test.R | 39 ++++++++++++++++++ tests/testthat/test-pkbc.R | 4 +- 8 files changed, 66 insertions(+), 7 deletions(-) diff --git a/.Rhistory b/.Rhistory index 31d0343..ec7aa7f 100644 --- a/.Rhistory +++ b/.Rhistory @@ -183,3 +183,19 @@ print(x) summary(x) x <- pkgcheck("C:/Users/sarac/Documents/GitHub/QuadratiK-package") summary(x) +library(pkgcheck) +x <- pkgcheck("C:/Users/sarac/Documents/GitHub/QuadratiK-package") +x <- pkgcheck("C:/Users/sarac/Documents/GitHub/QuadratiK-package") +summary(x) +expect_error(kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1), "b must be in (0,1]") +library(testthat) +expect_error(kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1), "b must be in (0,1]") +kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1) +library(QuadratiK) +expect_error(kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1), "b must be in (0,1]") +kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1) +expect_error(kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1), "b indicates the proportion used for the subsamples in the subsampling algoritm. It must be in (0,1]") +kb.test(x = matrix(rnorm(100), nrow = 10), h=0.5, b = -1) +"b indicates the proportion used for the subsamples in the subsampling algoritm. It must be in (0,1]" +expect_error(kb.test(x = seq(1,10), h=0.5), +"x must be a matrix or a data.frame") diff --git a/.Rproj.user/F4975BFA/pcs/source-pane.pper b/.Rproj.user/F4975BFA/pcs/source-pane.pper index 902cc6f..28a3c2e 100644 --- a/.Rproj.user/F4975BFA/pcs/source-pane.pper +++ b/.Rproj.user/F4975BFA/pcs/source-pane.pper @@ -1,3 +1,3 @@ { - "activeTab": 0 + "activeTab": 3 } \ No newline at end of file diff --git a/.Rproj.user/F4975BFA/pcs/windowlayoutstate.pper b/.Rproj.user/F4975BFA/pcs/windowlayoutstate.pper index 1dd0a7d..4d62338 100644 --- a/.Rproj.user/F4975BFA/pcs/windowlayoutstate.pper +++ b/.Rproj.user/F4975BFA/pcs/windowlayoutstate.pper @@ -1,12 +1,12 @@ { "left": { - "splitterpos": 310, + "splitterpos": 259, "topwindowstate": "NORMAL", "panelheight": 581, "windowheight": 619 }, "right": { - "splitterpos": 276, + "splitterpos": 289, "topwindowstate": "NORMAL", "panelheight": 581, "windowheight": 619 diff --git a/.Rproj.user/F4975BFA/sources/prop/INDEX b/.Rproj.user/F4975BFA/sources/prop/INDEX index 29370f8..a6cfd1a 100644 --- a/.Rproj.user/F4975BFA/sources/prop/INDEX +++ b/.Rproj.user/F4975BFA/sources/prop/INDEX @@ -76,12 +76,14 @@ C%3A%2FUsers%2Fsarac%2FDropbox%2FQuadratiK%2FR%2Fclustering_functions.R="B162137 ~%2FGitHub%2FQuadratiK-package%2FR%2FRcppExports.R="934B8C7E" ~%2FGitHub%2FQuadratiK-package%2FR%2Fclasses.R="59F6A2B7" ~%2FGitHub%2FQuadratiK-package%2FR%2Fclustering_functions.R="34601578" +~%2FGitHub%2FQuadratiK-package%2FR%2Fkb.test.R="0624883F" ~%2FGitHub%2FQuadratiK-package%2FR%2Fpk.test.R="187F1223" ~%2FGitHub%2FQuadratiK-package%2FR%2Fpkbd_functions.R="3642F78D" ~%2FGitHub%2FQuadratiK-package%2FR%2Futility.R="3597B12E" ~%2FGitHub%2FQuadratiK-package%2Fcodemeta.json="C0481113" ~%2FGitHub%2FQuadratiK-package%2Fman%2FQuadratiK-package.Rd="CF2E481E" ~%2FGitHub%2FQuadratiK-package%2Fman%2Fcompare_qq.Rd="750959FF" +~%2FGitHub%2FQuadratiK-package%2Ftests%2Ftestthat%2Ftest-kb.test.R="8D05DDE7" ~%2FGitHub%2FQuadratiK-package%2Ftests%2Ftestthat%2Ftest-pkbc.R="A2960E43" ~%2FGitHub%2FQuadratiK-package%2Ftests%2Ftestthat%2Ftest-rpkb.R="A61DC6ED" ~%2FGitHub%2FQuadratiK-package%2Ftests%2Ftestthat%2Ftest-sample_hypersphere.R="B8BCEE0B" diff --git a/.Rproj.user/shared/notebooks/paths b/.Rproj.user/shared/notebooks/paths index 6cf4d2b..6bd0c3c 100644 --- a/.Rproj.user/shared/notebooks/paths +++ b/.Rproj.user/shared/notebooks/paths @@ -1,8 +1,12 @@ -C:/Users/sarac/AppData/Local/cache/R/pkgcheck/static/QuadratiK_pkgstats13d04ea2.html="234DA1E6" C:/Users/sarac/Documents/GitHub/QuadratiK-package/.Rbuildignore="C485D008" C:/Users/sarac/Documents/GitHub/QuadratiK-package/DESCRIPTION="81DC6CFF" C:/Users/sarac/Documents/GitHub/QuadratiK-package/R/RcppExports.R="1C52515A" +C:/Users/sarac/Documents/GitHub/QuadratiK-package/R/classes.R="577DA69C" +C:/Users/sarac/Documents/GitHub/QuadratiK-package/R/pk.test.R="3CC5D390" C:/Users/sarac/Documents/GitHub/QuadratiK-package/R/pkbd_functions.R="1BEA4C49" C:/Users/sarac/Documents/GitHub/QuadratiK-package/codemeta.json="35775251" C:/Users/sarac/Documents/GitHub/QuadratiK-package/man/QuadratiK-package.Rd="71173F69" C:/Users/sarac/Documents/GitHub/QuadratiK-package/man/compare_qq.Rd="838321BF" +C:/Users/sarac/Documents/GitHub/QuadratiK-package/tests/testthat/test-rpkb.R="251BDAC0" +C:/Users/sarac/Documents/GitHub/QuadratiK-package/tests/testthat/test-sample_hypersphere.R="599F043F" +C:/Users/sarac/Documents/GitHub/QuadratiK-package/tests/testthat/test.dpkb.R="449F69A9" diff --git a/src/QuadratiK.dll b/src/QuadratiK.dll index f7397faa06b2e413c6f98da19df644fac6773025..3cb9d73c973ff79f0f0c5e6ce2a232e8ef5897db 100644 GIT binary patch delta 1100 zcmWl}cbv|3007|6y?7mmj*O;^WG5|=h6)u~DMTW&N>nJ)xaynh6t1q0wuTT{q1;JP zWUo+PEp0PGL#dwMAJ0=*usE}jNx7+-+4*@LQq7OJz=Oodn?#F8PF3NamG=@2tR zEE8hc5VJxo7h?GkD};DLh}j`l46#y(Cx%#gVXV@iC{;asT)MalRjI~FoXjbl%4wWV zbBY_T<`(+Ums{yae{N#{ z0~y3%hHyJ~FqAtP#&GW9Zth_OBN@fL+{b9fa6e;tfCqVqhsog)9_29tk28*3o*<9$ zJjqi`U?P*q=V_jyfMKg;$x%YrM`Iyva1)VmdRJ$=l3gHt#Tp zxy)le3wW1>EMhV5@jgo^qL`(8z%oAMBbKv*kNJd^tm0Evvxc>-V?7(#$R;+kg{^$X zHny{a&-sGLPQK(TzUCXgWf$M^JwNaxKk+lau$w*XWgq)Fz^@$S5WjJlBOK*-{@_pk y;uwGP56AhJ|Hh|_GbWOhN-B|5GO1KjI;nJ0W>T4?vPoG<Oof;)#QY%^2r(UE!4NY; zEEHnl5VJxo5@OL1i-mYrh{Z!J5#re)o)copWwBJ16{*@;qtbb$IG6J{pVE|}EEjMg z7jZG=xPTxi{A9%5&H5d{pimC9%CSb7|i25!IKQ(DW2vThBA!dJj)0IBN@eL#*j@8 zV|k8ojAsH9nZ#tKFqP-Y@S-?UT zv6v;i!%~*= 0 & result@res_k$postProbs <= 1))