Running 'random_write_test.R' [172s]
Running the tests in 'tests/random_write_test.R' failed.
Complete output:
  > n = 20;
  > 
  > library(filematrix)
  > fmt = fm.create(filenamebase = tempfile(), nrow = n, ncol = n)
  > mat = matrix(0, nrow = n, ncol = n);
  > 
  > 
  > rownames(fmt) = as.character(1:nrow(fmt));
  > colnames(fmt) = as.character(1:ncol(fmt));
  > 
  > ### Fully indexed access
  > 
  > k = 10;
  > for( test in 1:20 ){
  + 
  +     message("Fully indexed access, test ", test);
  +     rowset = sample.int(n, size = k);
  +     colset = sample.int(n, size = k);
  +     
  +     value = matrix(
  +                 data = runif(length(rowset)*length(colset)),
  +                 nrow = length(rowset),
  +                 ncol = length(colset));
  +     
  +     stopifnot( all( fmt[rowset, colset] == mat[rowset, colset] ) );
  + 
  +     fmt[rowset, colset] = value;
  +     mat[rowset, colset] = value;
  + }
  Fully indexed access, test 1
  Fully indexed access, test 2
  Fully indexed access, test 3
  Fully indexed access, test 4
  Fully indexed access, test 5
  Fully indexed access, test 6
  Fully indexed access, test 7
  Fully indexed access, test 8
  Fully indexed access, test 9
  Fully indexed access, test 10
  Fully indexed access, test 11
  Fully indexed access, test 12
  Fully indexed access, test 13
  Fully indexed access, test 14
  Fully indexed access, test 15
  Fully indexed access, test 16
  Fully indexed access, test 17
  Fully indexed access, test 18
  Fully indexed access, test 19
  Fully indexed access, test 20
  > stopifnot( all( as.matrix(fmt) == mat ) );
  > 
  > 
  > ### All columns access
  > 
  > k = 10;
  > for( test in 1:20 ){
  +     
  +     message("All columns access, test ", test);
  +     colset = sample.int(n, size = k);
  +     
  +     value = matrix(runif(length(rowset)*n), nrow = length(rowset), ncol = n);
  +     
  +     stopifnot( all( fmt[rowset, ] == mat[rowset, ] ) );
  + 
  +     fmt[rowset, ] = value;
  +     mat[rowset, ] = value;
  + }
  All columns access, test 1
  All columns access, test 2
  All columns access, test 3
  All columns access, test 4
  All columns access, test 5
  All columns access, test 6
  All columns access, test 7
  All columns access, test 8
  All columns access, test 9
  All columns access, test 10
  All columns access, test 11
  All columns access, test 12
  All columns access, test 13
  All columns access, test 14
  All columns access, test 15
  All columns access, test 16
  All columns access, test 17
  All columns access, test 18
  All columns access, test 19
  All columns access, test 20
  > stopifnot( all( as.matrix(fmt) == mat ) );
  > 
  > 
  > ### All rows access
  > 
  > k = 10;
  > for( test in 1:20 ){
  +     
  +     message("All rows access, test ", test);
  +     colset = sample.int(n, size = k);
  +     
  +     value = matrix( runif(n*length(colset)), nrow = n, ncol = length(colset));
  +     
  +     stopifnot( all( fmt[, colset] == mat[, colset] ) );
  + 
  +     fmt[, colset] = value;
  +     mat[, colset] = value;
  + }
  All rows access, test 1
  All rows access, test 2
  All rows access, test 3
  All rows access, test 4
  All rows access, test 5
  All rows access, test 6
  All rows access, test 7
  All rows access, test 8
  All rows access, test 9
  All rows access, test 10
  All rows access, test 11
  All rows access, test 12
  All rows access, test 13
  All rows access, test 14
  All rows access, test 15
  All rows access, test 16
  All rows access, test 17
  All rows access, test 18
  All rows access, test 19
  All rows access, test 20
  > stopifnot( all( as.matrix(fmt) == mat ) );
  > 
  > 
  > ### Vector access
  > 
  > k = 10;
  > for( test in 1:20 ){
  +     
  +     message("Vector access, test ", test);
  +     set = sample.int(n^2, size = k^2);
  +     
  +     value = runif(k^2);
  +     
  +     stopifnot( all( fmt[set] == mat[set] ) );
  +     
  +     fmt[set] = value;
  +     mat[set] = value;
  + }
  Vector access, test 1
  Vector access, test 2
  Vector access, test 3
  Vector access, test 4
  Vector access, test 5
  Vector access, test 6
  Vector access, test 7
  Vector access, test 8
  Vector access, test 9
  Vector access, test 10
  Vector access, test 11
  Vector access, test 12
  Vector access, test 13
  Vector access, test 14
  Vector access, test 15
  Vector access, test 16
  Vector access, test 17
  Vector access, test 18
  Vector access, test 19
  Vector access, test 20
  > stopifnot( all( as.matrix(fmt) == mat ) );
  > 
  > closeAndDeleteFiles(fmt);
  > 
  > proc.time()
     user  system elapsed 
     1.62    0.20    1.81