Last updated on 2025-10-27 17:50:22 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 0.3-9 | 6.63 | 154.32 | 160.95 | OK | |
| r-devel-linux-x86_64-debian-gcc | 0.3-9 | 4.15 | 98.14 | 102.29 | OK | |
| r-devel-linux-x86_64-fedora-clang | 0.3-9 | 12.00 | 230.06 | 242.06 | OK | |
| r-devel-linux-x86_64-fedora-gcc | 0.3-9 | 12.00 | 229.23 | 241.23 | OK | |
| r-devel-windows-x86_64 | 0.3-9 | 7.00 | 172.00 | 179.00 | OK | |
| r-patched-linux-x86_64 | 0.3-9 | 7.74 | 145.76 | 153.50 | OK | |
| r-release-linux-x86_64 | 0.3-9 | 4.92 | 144.90 | 149.82 | OK | |
| r-release-macos-arm64 | 0.3-9 | 3.00 | 67.00 | 70.00 | OK | |
| r-release-macos-x86_64 | 0.3-9 | 6.00 | 159.00 | 165.00 | OK | |
| r-release-windows-x86_64 | 0.3-9 | 7.00 | 170.00 | 177.00 | ERROR | |
| r-oldrel-macos-arm64 | 0.3-9 | 3.00 | 75.00 | 78.00 | OK | |
| r-oldrel-macos-x86_64 | 0.3-9 | 8.00 | 150.00 | 158.00 | OK | |
| r-oldrel-windows-x86_64 | 0.3-9 | 10.00 | 217.00 | 227.00 | OK |
Version: 0.3-9
Check: tests
Result: ERROR
Running 'Rd.R' [2s]
Running 'absindex.R' [1s]
Running 'corcondia.R' [3s]
Running 'feem.R' [0s]
Running 'feemcube.R' [0s]
Running 'feemife.R' [1s]
Running 'feemlist.R' [1s]
Running 'feemscale.R' [0s]
Running 'feemscatter.R' [4s]
Running 'flame.R' [9s]
Running 'grid.R' [3s]
Running 'import.R' [1s]
Running 'indices.R' [2s]
Running 'jackknife.R' [20s]
Running 'parafac.R' [5s]
Running 'splithalf.R' [16s]
Running 'whittaker.R' [2s]
Running the tests in 'tests/splithalf.R' failed.
Complete output:
> library(albatross)
> library(tools)
> data(feems)
>
> cube <- feemscale(feemscatter(cube, rep(24, 4), 'pchip'), na.rm = TRUE)
================================================================================
>
> # must make sense for only one number of factors / one split
> (sh <- feemsplithalf(cube, 2, random = 1, ctol = 1e-4))
================================================================================
Split-half: minimal TCC between matching components
2
0.9571457
> stopifnot(inherits(sh, 'feemsplithalf'))
>
> # must handle non-even numbers of samples
> (sh <- feemsplithalf(cube[,,1:11], 2, splits = 4, ctol = 1e-4))
================================================================================
Split-half: minimal TCC between matching components
2
0.7957924
> # feemsplithalf(splits=s) makes choose(s, s/2) halves then combines them
> # resulting in choose(s, s/2)/2 comparisons
> stopifnot(dim(sh$factors)[3] == choose(4, 2)/2)
> # must be able to limit the number of comparisons
> (sh <- feemsplithalf(cube, 2, splits = c(10, 5), ctol = 1e-4))
================================================================================
Split-half: minimal TCC between matching components
2
0.8839925
> stopifnot(dim(sh$factors)[3] == 5)
>
> # must not compare splits containing same samples
> for (pair in coef(sh)$subset)
+ stopifnot(length(intersect(pair[[1]], pair[[2]])) == 0)
>
> # must handle progress argument
> (sh <- feemsplithalf(cube, 2, random = 1, progress = FALSE, ctol = 1e-4))
Split-half: minimal TCC between matching components
2
0.930967
>
> # must work correctly when there's only one pair of splits
> coef(feemsplithalf(cube, 2, splits = 2, ctol = 1e-4))
================================================================================
factor tcc test subset nfac
1 1 0.8395847 1 c(1, 3, .... 2
2 2 0.9855051 1 c(1, 3, .... 2
>
> # must work with groups of length() == splits
> groups <- c(rep(1, 4), rep(2, 8))
> for (pair in coef(feemsplithalf(
+ cube, 2, splits = 4, groups = groups, ctol = 1e-4
+ ))$splits) stopifnot(
+ # NB: for odd numbers of samples results are less strict but close
+ table(groups[pair[[1]]]) * 2 == table(groups),
+ table(groups[pair[[2]]]) * 2 == table(groups)
+ )
================================================================================
>
> # must be able to create halves from a group of length() == 2
> groups <- c(rep(1, 2), rep(2, 10))
> for (pair in coef(feemsplithalf(
+ cube, 2, random = 3, groups = groups, ctol = 1e-4
+ ))$splits) stopifnot(
+ table(groups[pair[[1]]]) * 2 == table(groups),
+ table(groups[pair[[2]]]) * 2 == table(groups)
+ )
================================================================================
>
> # must understand lists of factors
> groups1 <- list(
+ c(rep(1, 8), rep(2, 4)),
+ c(rep(1, 4), rep(2, 8))
+ )
> groups2 <- c(rep(1, 4), rep(2, 4), rep(3, 4))
> for (pair in coef(feemsplithalf(
+ cube, 2, splits = 2, groups = groups1, ctol = 1e-4
+ ))$splits) stopifnot(
+ table(groups2[pair[[1]]]) * 2 == table(groups2),
+ table(groups2[pair[[2]]]) * 2 == table(groups2)
+ )
================================================================================
>
> # must return the correct columns
> stopifnot(colnames(coef(sh, 'tcc')) == c(
+ 'factor', 'tcc', 'test', 'subset', 'nfac'
+ ))
> stopifnot(colnames(coef(sh, 'factors')) == c(
+ 'wavelength', 'value', 'factor', 'mode',
+ 'nfac', 'test', 'half', 'subset'
+ ))
>
> # #fac, #test, Nfac must identify a point in df of TCCs
> stopifnot(1 == aggregate(
+ tcc ~ factor + nfac + test, coef(sh, 'tcc'),
+ FUN = length
+ )$tcc)
>
> # wavelength + #fac + mode + Nfac + #test + #half must identify point
> stopifnot(1 == aggregate(
+ value ~ wavelength + factor + mode + nfac + test + half,
+ coef(sh, 'factors'),
+ FUN = length
+ )$value)
>
> fixed <- list(list(
+ 1:(round(dim(cube)[3]/2)),
+ (round(dim(cube)[3]/2)+1):dim(cube)[3]
+ ))
> sh <- feemsplithalf(cube, 1, fixed = fixed, ctol = 1e-4)
================================================================================
> # NOTE: testing one-factor model so that coef(sh) will have as many rows
> # as elements in `fixed`
> # NOTE: unclass() removes the "AsIs" class from the data.frame column
> stopifnot(all.equal(fixed, unclass(coef(sh)$subset)))
> # testing intersecting splits is an error
> fixed[[1]][[2]][1] <- fixed[[1]][[1]][1]
> assertError(feemsplithalf(cube, 2, fixed = fixed), verbose = TRUE)
Asserted error: Both halves in fixed[[1]] contain the following samples: 1
> # providing groups at the same time as fixed splits, or asking for
> # split-combine or random splits, is an error
> assertError(
+ feemsplithalf(cube, 2, fixed = fixed, groups = groups), verbose = TRUE
+ )
Asserted error: Please either request split-combine or random halves (optionally stratified by groups), or provide fixed halves.
> assertError(
+ feemsplithalf(cube, 2, fixed = fixed, splits = 2), verbose = TRUE
+ )
Asserted error: Please either request split-combine or random halves (optionally stratified by groups), or provide fixed halves.
> assertError(
+ feemsplithalf(cube, 2, fixed = fixed, random = 2), verbose = TRUE
+ )
Asserted error: Please either request split-combine or random halves (optionally stratified by groups), or provide fixed halves.
> # asking for both split-combine and random halves is an error
> assertError(feemsplithalf(cube, 2, splits = 2, random = 2), verbose = TRUE)
Asserted error: Please either request split-combine or random halves (optionally stratified by groups), or provide fixed halves.
>
> stopifnot(all.equal(cube, feemcube(sh)))
>
> # exercise some plot types not used otherwise
> plot(sh, 'factors')
> # "subset" takes some care to forward NSE bits properly
> plot(sh, 'bandfactors', subset = nfac == 1 & mode == 'Emission')
>
> # Parallel `bootparafac` is a whole separate thing now
> library(parallel)
> cl <- makeCluster(2)
Error in serverSocket(port = port) :
creation of server socket failed: port 11966 cannot be opened
Calls: makeCluster -> makePSOCKcluster -> serverSocket
Execution halted
Flavor: r-release-windows-x86_64