Last updated on 2025-04-04 05:53:28 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.1.3.5 | 7.05 | 72.91 | 79.96 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 0.1.3.6 | 4.19 | 147.61 | 151.80 | OK | |
r-devel-linux-x86_64-fedora-clang | 0.1.3.6 | 366.54 | OK | |||
r-devel-linux-x86_64-fedora-gcc | 0.1.3.6 | 385.24 | OK | |||
r-devel-macos-arm64 | 0.1.3.5 | 41.00 | ERROR | |||
r-devel-macos-x86_64 | 0.1.3.5 | 220.00 | NOTE | |||
r-devel-windows-x86_64 | 0.1.3.6 | 9.00 | 252.00 | 261.00 | OK | |
r-patched-linux-x86_64 | 0.1.3.5 | 7.06 | 69.31 | 76.37 | ERROR | |
r-release-linux-x86_64 | 0.1.3.6 | 5.87 | 195.61 | 201.48 | OK | |
r-release-macos-arm64 | 0.1.3.5 | 127.00 | OK | |||
r-release-macos-x86_64 | 0.1.3.5 | 220.00 | OK | |||
r-release-windows-x86_64 | 0.1.3.6 | 9.00 | 245.00 | 254.00 | OK | |
r-oldrel-macos-arm64 | 0.1.3.5 | OK | ||||
r-oldrel-macos-x86_64 | 0.1.3.5 | 230.00 | OK | |||
r-oldrel-windows-x86_64 | 0.1.3.6 | 10.00 | 211.00 | 221.00 | OK |
Version: 0.1.3.5
Check: DESCRIPTION meta-information
Result: NOTE
Missing dependency on R >= 4.1.0 because package code uses the pipe
|> or function shorthand \(...) syntax added in R 4.1.0.
File(s) using such syntax:
‘summary.spjctest.R’ ‘summary.spqtest.R’
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-macos-arm64, r-devel-macos-x86_64, r-patched-linux-x86_64
Version: 0.1.3.5
Check: examples
Result: ERROR
Running examples in ‘spqdep-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Q.map.test
> ### Title: Compute the QE and QI tests of Equivalence and Independence
> ### between maps
> ### Aliases: Q.map.test
>
> ### ** Examples
>
>
> # Case 1:
> N <- 200
> cx <- runif(N)
> cy <- runif(N)
> x <- cbind(cx,cy)
> listw <- spdep::nb2listw(spdep::knn2nb(
+ spdep::knearneigh(cbind(cx,cy), k = 4)))
> p <- c(1/6, 3/6, 2/6)
> rho = 0.5
> QY1 <- dgp.spq(p = p, listw = listw, rho = rho)
> rho = 0.8
> QY2 <- dgp.spq(p = p, listw = listw, rho = rho)
> dt = data.frame(QY1,QY2)
> m = 3
> r = 1
> formula <- ~ QY1 + QY2
> control <- list(dtmaxknn = 10)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations", control = control)
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QE = 253.84, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QI = 66.772, df = 81, p-value = 0.8724
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> plot(qmap, ci=.6)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
> plot(qmap[[1]]$mh)
> summary(qmap[[1]]$mh)
Characteristics of m-surrounding:
Number of m-surrounding (R): 90
Length of m-surrounding (m): 3
Number no-symbolized observations: 12
List of no-symbolized observations:
8 62 66 69 80 85 117 122 130 146 191 199
List of the degree overlaping:
There are 2 m-surrounding that have intersection with 0 m-surrounding
There are 12 m-surrounding that have intersection with 1 m-surrounding
There are 76 m-surrounding that have intersection with 2 m-surrounding
Mean degree of overlaping: 1.8222
>
> control <- list(dtmaxknn = 20)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="permutations", control = control)
Warning in Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r, :
The ratio between the number of symbolized observations and the number of symbols is lower than 5.
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: permutations
Ratio Symbolized observations/Num symbols = 3.44
data: QY1 and QY2
QE = 275.57, df = 26, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: permutations
Ratio Symbolized observations/Num symbols = 3.44
data: QY1 and QY2
QI = 244.87, df = 676, p-value = 1
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> plot(qmap[[1]]$mh)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations")
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9.9
data: QY1 and QY2
QE = 280.46, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9.9
data: QY1 and QY2
QI = 63.621, df = 81, p-value = 0.9228
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> control <- list(dtmaxknn = 10)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations", control = control)
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QE = 253.84, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QI = 66.772, df = 81, p-value = 0.8724
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
>
> # Case 2:
> data(provinces_spain)
> # sf::sf_use_s2(FALSE)
> m = 3
> r = 1
>
> provinces_spain$Mal2Fml <- factor(provinces_spain$Mal2Fml > 100)
> levels(provinces_spain$Mal2Fml) = c("men","woman")
> provinces_spain$Coast <- factor(provinces_spain$Coast)
> levels(provinces_spain$Coast) = c("no","yes")
> formula <- ~ Coast + Mal2Fml
> qmap <- Q.map.test(formula = formula, data = provinces_spain, m = m, r = r,
+ type ="combinations")
Error in UseMethod("units") :
no applicable method for 'units' applied to an object of class "NULL"
Calls: Q.map.test -> m.surround -> rbind -> rbind -> units
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 0.1.3.5
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘user-guide.Rmd’ using rmarkdown
** Processing: /home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/unnamed-chunk-5-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 29601 bytes
Input file size = 29715 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 21782
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 21782
Output IDAT size = 21782 bytes (7819 bytes decrease)
Output file size = 21860 bytes (7855 bytes = 26.43% decrease)
** Processing: /home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/plot mh-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 29819 bytes
Input file size = 29933 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 27237
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 27237
Output IDAT size = 27237 bytes (2582 bytes decrease)
Output file size = 27315 bytes (2618 bytes = 8.75% decrease)
** Processing: /home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/plot mh prune-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 28643 bytes
Input file size = 28757 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 25872
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 25872
Output IDAT size = 25872 bytes (2771 bytes decrease)
Output file size = 25950 bytes (2807 bytes = 9.76% decrease)
** Processing: /home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/unnamed-chunk-10-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 28305 bytes
Input file size = 28419 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 20614
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 20614
Output IDAT size = 20614 bytes (7691 bytes decrease)
Output file size = 20692 bytes (7727 bytes = 27.19% decrease)
** Processing: /home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/unnamed-chunk-10-2.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 21623 bytes
Input file size = 21725 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 16190
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 16190
Output IDAT size = 16190 bytes (5433 bytes decrease)
Output file size = 16268 bytes (5457 bytes = 25.12% decrease)
Quitting from user-guide.Rmd:272-279 [unnamed-chunk-11]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `UseMethod()`:
! no applicable method for 'units' applied to an object of class "NULL"
---
Backtrace:
▆
1. └─spqdep::Q.test(formula = f1, data = provinces_spain, m = 3, r = 1)
2. └─spqdep::m.surround(...)
3. └─base::rbind(mdtms, rowds)
4. └─units (local) rbind(deparse.level, ...)
5. └─base::units(dots[[1]])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'user-guide.Rmd' failed with diagnostics:
no applicable method for 'units' applied to an object of class "NULL"
--- failed re-building ‘user-guide.Rmd’
SUMMARY: processing the following file failed:
‘user-guide.Rmd’
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 0.1.3.5
Check: examples
Result: ERROR
Running examples in ‘spqdep-Ex.R’ failed
The error most likely occurred in:
> ### Name: Q.map.test
> ### Title: Compute the QE and QI tests of Equivalence and Independence
> ### between maps
> ### Aliases: Q.map.test
>
> ### ** Examples
>
>
> # Case 1:
> N <- 200
> cx <- runif(N)
> cy <- runif(N)
> x <- cbind(cx,cy)
> listw <- spdep::nb2listw(spdep::knn2nb(
+ spdep::knearneigh(cbind(cx,cy), k = 4)))
> p <- c(1/6, 3/6, 2/6)
> rho = 0.5
> QY1 <- dgp.spq(p = p, listw = listw, rho = rho)
> rho = 0.8
> QY2 <- dgp.spq(p = p, listw = listw, rho = rho)
> dt = data.frame(QY1,QY2)
> m = 3
> r = 1
> formula <- ~ QY1 + QY2
> control <- list(dtmaxknn = 10)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations", control = control)
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QE = 271.44, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QI = 69.795, df = 81, p-value = 0.8083
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
> plot(qmap, ci=.6)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
> plot(qmap[[1]]$mh)
> summary(qmap[[1]]$mh)
Characteristics of m-surrounding:
Number of m-surrounding (R): 90
Length of m-surrounding (m): 3
Number no-symbolized observations: 12
List of no-symbolized observations:
8 62 66 69 80 85 117 122 130 146 191 199
List of the degree overlaping:
There are 2 m-surrounding that have intersection with 0 m-surrounding
There are 12 m-surrounding that have intersection with 1 m-surrounding
There are 76 m-surrounding that have intersection with 2 m-surrounding
Mean degree of overlaping: 1.8222
>
> control <- list(dtmaxknn = 20)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="permutations", control = control)
Warning in Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r, :
The ratio between the number of symbolized observations and the number of symbols is lower than 5.
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: permutations
Ratio Symbolized observations/Num symbols = 3.44
data: QY1 and QY2
QE = 283.51, df = 26, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: permutations
Ratio Symbolized observations/Num symbols = 3.44
data: QY1 and QY2
QI = 228.39, df = 676, p-value = 1
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> plot(qmap[[1]]$mh)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations")
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9.9
data: QY1 and QY2
QE = 294.45, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9.9
data: QY1 and QY2
QI = 80.582, df = 81, p-value = 0.4922
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
> control <- list(dtmaxknn = 10)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations", control = control)
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QE = 271.44, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QI = 69.795, df = 81, p-value = 0.8083
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
>
> # Case 2:
> data(provinces_spain)
> # sf::sf_use_s2(FALSE)
> m = 3
> r = 1
>
> provinces_spain$Mal2Fml <- factor(provinces_spain$Mal2Fml > 100)
> levels(provinces_spain$Mal2Fml) = c("men","woman")
> provinces_spain$Coast <- factor(provinces_spain$Coast)
> levels(provinces_spain$Coast) = c("no","yes")
> formula <- ~ Coast + Mal2Fml
> qmap <- Q.map.test(formula = formula, data = provinces_spain, m = m, r = r,
+ type ="combinations")
Error in UseMethod("units") :
no applicable method for 'units' applied to an object of class "NULL"
Calls: Q.map.test -> m.surround -> rbind -> rbind -> units
Execution halted
Flavor: r-devel-macos-arm64
Version: 0.1.3.5
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
--- re-building ‘user-guide.Rmd’ using rmarkdown
Quitting from user-guide.Rmd:272-279 [unnamed-chunk-11]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `UseMethod()`:
! no applicable method for 'units' applied to an object of class "NULL"
---
Backtrace:
▆
1. └─spqdep::Q.test(formula = f1, data = provinces_spain, m = 3, r = 1)
2. └─spqdep::m.surround(...)
3. └─base::rbind(mdtms, rowds)
4. └─units (local) rbind(deparse.level, ...)
5. └─base::units(dots[[1]])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'user-guide.Rmd' failed with diagnostics:
no applicable method for 'units' applied to an object of class "NULL"
--- failed re-building ‘user-guide.Rmd’
SUMMARY: processing the following file failed:
‘user-guide.Rmd’
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-macos-arm64
Version: 0.1.3.5
Check: examples
Result: ERROR
Running examples in ‘spqdep-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Q.map.test
> ### Title: Compute the QE and QI tests of Equivalence and Independence
> ### between maps
> ### Aliases: Q.map.test
>
> ### ** Examples
>
>
> # Case 1:
> N <- 200
> cx <- runif(N)
> cy <- runif(N)
> x <- cbind(cx,cy)
> listw <- spdep::nb2listw(spdep::knn2nb(
+ spdep::knearneigh(cbind(cx,cy), k = 4)))
> p <- c(1/6, 3/6, 2/6)
> rho = 0.5
> QY1 <- dgp.spq(p = p, listw = listw, rho = rho)
> rho = 0.8
> QY2 <- dgp.spq(p = p, listw = listw, rho = rho)
> dt = data.frame(QY1,QY2)
> m = 3
> r = 1
> formula <- ~ QY1 + QY2
> control <- list(dtmaxknn = 10)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations", control = control)
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QE = 259.35, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QI = 57.683, df = 81, p-value = 0.9768
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> plot(qmap, ci=.6)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
> plot(qmap[[1]]$mh)
> summary(qmap[[1]]$mh)
Characteristics of m-surrounding:
Number of m-surrounding (R): 90
Length of m-surrounding (m): 3
Number no-symbolized observations: 12
List of no-symbolized observations:
8 62 66 69 80 85 117 122 130 146 191 199
List of the degree overlaping:
There are 2 m-surrounding that have intersection with 0 m-surrounding
There are 12 m-surrounding that have intersection with 1 m-surrounding
There are 76 m-surrounding that have intersection with 2 m-surrounding
Mean degree of overlaping: 1.8222
>
> control <- list(dtmaxknn = 20)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="permutations", control = control)
Warning in Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r, :
The ratio between the number of symbolized observations and the number of symbols is lower than 5.
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: permutations
Ratio Symbolized observations/Num symbols = 3.44
data: QY1 and QY2
QE = 274.12, df = 26, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: permutations
Ratio Symbolized observations/Num symbols = 3.44
data: QY1 and QY2
QI = 224.62, df = 676, p-value = 1
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> plot(qmap[[1]]$mh)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations")
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9.9
data: QY1 and QY2
QE = 284.9, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9.9
data: QY1 and QY2
QI = 58.648, df = 81, p-value = 0.971
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
> control <- list(dtmaxknn = 10)
> qmap <- Q.map.test(formula = formula, data = dt, coor = x, m = m, r = r,
+ type ="combinations", control = control)
> print(qmap)
[[1]]
Q-Map test of Equivalence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QE = 259.35, df = 9, p-value < 2.2e-16
alternative hypothesis: two.sided
[[2]]
Q-Map test of Independence for qualitative data.
Symbols type: combinations
Ratio Symbolized observations/Num symbols = 9
data: QY1 and QY2
QI = 57.683, df = 81, p-value = 0.9768
alternative hypothesis: two.sided
attr(,"class")
[1] "qmap" "list"
> plot(qmap)
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: Use of `data$symb` is discouraged.
ℹ Use `symb` instead.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
Warning: No shared levels found between `names(values)` of the manual scale and the
data's fill values.
>
> # Case 2:
> data(provinces_spain)
> # sf::sf_use_s2(FALSE)
> m = 3
> r = 1
>
> provinces_spain$Mal2Fml <- factor(provinces_spain$Mal2Fml > 100)
> levels(provinces_spain$Mal2Fml) = c("men","woman")
> provinces_spain$Coast <- factor(provinces_spain$Coast)
> levels(provinces_spain$Coast) = c("no","yes")
> formula <- ~ Coast + Mal2Fml
> qmap <- Q.map.test(formula = formula, data = provinces_spain, m = m, r = r,
+ type ="combinations")
Error in UseMethod("units") :
no applicable method for 'units' applied to an object of class "NULL"
Calls: Q.map.test -> m.surround -> rbind -> rbind -> units
Execution halted
Flavor: r-patched-linux-x86_64
Version: 0.1.3.5
Check: re-building of vignette outputs
Result: ERROR
Error(s) in re-building vignettes:
...
--- re-building ‘user-guide.Rmd’ using rmarkdown
** Processing: /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/unnamed-chunk-5-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 28828 bytes
Input file size = 28942 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 21296
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 21296
Output IDAT size = 21296 bytes (7532 bytes decrease)
Output file size = 21374 bytes (7568 bytes = 26.15% decrease)
** Processing: /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/plot mh-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 29819 bytes
Input file size = 29933 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 27237
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 27237
Output IDAT size = 27237 bytes (2582 bytes decrease)
Output file size = 27315 bytes (2618 bytes = 8.75% decrease)
** Processing: /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/plot mh prune-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 28643 bytes
Input file size = 28757 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 25872
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 25872
Output IDAT size = 25872 bytes (2771 bytes decrease)
Output file size = 25950 bytes (2807 bytes = 9.76% decrease)
** Processing: /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/unnamed-chunk-10-1.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 28176 bytes
Input file size = 28290 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 20480
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 20480
Output IDAT size = 20480 bytes (7696 bytes decrease)
Output file size = 20558 bytes (7732 bytes = 27.33% decrease)
** Processing: /home/hornik/tmp/R.check/r-patched-gcc/Work/PKGS/spqdep.Rcheck/vign_test/spqdep/vignettes/user-guide_files/figure-html/unnamed-chunk-10-2.png
288x288 pixels, 3x8 bits/pixel, RGB
Input IDAT size = 21604 bytes
Input file size = 21706 bytes
Trying:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 16191
zc = 9 zm = 8 zs = 1 f = 0
zc = 1 zm = 8 zs = 2 f = 0
zc = 9 zm = 8 zs = 3 f = 0
zc = 9 zm = 8 zs = 0 f = 5
zc = 9 zm = 8 zs = 1 f = 5
zc = 1 zm = 8 zs = 2 f = 5
zc = 9 zm = 8 zs = 3 f = 5
Selecting parameters:
zc = 9 zm = 8 zs = 0 f = 0 IDAT size = 16191
Output IDAT size = 16191 bytes (5413 bytes decrease)
Output file size = 16269 bytes (5437 bytes = 25.05% decrease)
Quitting from user-guide.Rmd:272-279 [unnamed-chunk-11]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<error/rlang_error>
Error in `UseMethod()`:
! no applicable method for 'units' applied to an object of class "NULL"
---
Backtrace:
▆
1. └─spqdep::Q.test(formula = f1, data = provinces_spain, m = 3, r = 1)
2. └─spqdep::m.surround(...)
3. └─base::rbind(mdtms, rowds)
4. └─units (local) rbind(deparse.level, ...)
5. └─base::units(dots[[1]])
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: processing vignette 'user-guide.Rmd' failed with diagnostics:
no applicable method for 'units' applied to an object of class "NULL"
--- failed re-building ‘user-guide.Rmd’
SUMMARY: processing the following file failed:
‘user-guide.Rmd’
Error: Vignette re-building failed.
Execution halted
Flavor: r-patched-linux-x86_64