Running examples in ‘ff-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: dim.ff
> ### Title: Getting and setting dim and dimorder
> ### Aliases: dim.ff dim.ffdf dim<-.ff dim<-.ffdf dimorder dimorder.default
> ###   dimorder.ff_array dimorder.ffdf dimorder<- dimorder<-.ff_array
> ###   dimorder<-.ffdf
> ### Keywords: IO data
> 
> ### ** Examples
> 
>   x <- ff(1:12, dim=c(3,4), dimorder=c(2:1))
>   y <- x
>   dim(y) <- c(4,3)
>   dimorder(y) <- c(1:2)
>   x
ff (open) integer length=12 (12) dim=c(3,4) dimorder=c(2,1)
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
>   y
ff (open) integer length=12 (12) dim=c(4,3) dimorder=c(1,2)
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
[4,]   10   11   12
>   x[]
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
>   y[]
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
[4,]   10   11   12
>   x[,bydim=c(2,1)]
     [,1] [,2] [,3]
[1,]    1    2    3
[2,]    4    5    6
[3,]    7    8    9
[4,]   10   11   12
>   y[,bydim=c(2,1)]
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
> 
>   message("NOTE that x[] like x[,] returns a matrix (respects dimorder),")
NOTE that x[] like x[,] returns a matrix (respects dimorder),
>   message("while x[1:12] returns a vector IN STORAGE ORDER")
while x[1:12] returns a vector IN STORAGE ORDER
>   message("check the following examples twice to make sure you understand this")
check the following examples twice to make sure you understand this
>   x[,]
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
>   x[]
     [,1] [,2] [,3] [,4]
[1,]    1    4    7   10
[2,]    2    5    8   11
[3,]    3    6    9   12
>   as.vector(x[])
 [1]  1  2  3  4  5  6  7  8  9 10 11 12
>   x[1:12]
 [1]  1  2  3  4  5  6  7  8  9 10 11 12
>   rm(x,y); gc()
          used (Mb) gc trigger (Mb) max used (Mb)
Ncells  613500 32.8    1291484   69   962680 51.5
Vcells 1160725  8.9    8388608   64  2177754 16.7
> 
>   ## Don't show: 
>     message("some regression test with regard to different dimorders")
some regression test with regard to different dimorders
>     k <- 24
>     d <- 3:5
>     n <- prod(d)
>     for (i in 1:k){
+       a <- array(sample(n), dim=sample(d))
+       x <- as.ff(a, dimorder=sample(seq_along(d)))
+       if (!identical(a[1:n], x[1:n]))
+         stop("error in caclulating access positions")
+       if (!identical(a[1:dim(a)[1],,], x[1:dim(a)[1],,]))
+         stop("error in caclulating access positions")
+     }
Error in ff(initdata = initdata, length = length, levels = levels, ordered = ordered,  : 
  r_ff_new write error
Calls: as.ff -> as.ff.default -> clone.ff -> assign -> ff
Execution halted