printing ff objects and compactly showing their structure

# S3 method for class 'ff'
print(x, ...)
# S3 method for class 'ff_vector'
print(x, maxlength = 16, ...)
# S3 method for class 'ff_matrix'
print(x, maxdim = c(16, 16), ...)
# S3 method for class 'ff'
str(object, nest.lev=0, ...)
# S3 method for class 'ffdf'
str(object, nest.lev=0, ...)

Arguments

x

a ff object

object

a ff object

nest.lev

current nesting level in the recursive calls to str

maxlength

max number of elements to print from an ff_vector

maxdim

max number of elements to print from each dimension from an ff_array

...

further arguments to print

Details

The print methods just print a few exmplary elements from the beginning and end of the dimensions.

Value

invisible()

Author

Jens Oehlschlägel

See also

Examples

  x <- ff(1:10000)
  x
#> ff (open) integer length=10000 (10000)
#>     [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]          [9993] 
#>       1       2       3       4       5       6       7       8       :    9993 
#>  [9994]  [9995]  [9996]  [9997]  [9998]  [9999] [10000] 
#>    9994    9995    9996    9997    9998    9999   10000 
  print(x, maxlength=30)
#> ff (open) integer length=10000 (10000)
#>     [1]     [2]     [3]     [4]     [5]     [6]     [7]     [8]     [9]    [10] 
#>       1       2       3       4       5       6       7       8       9      10 
#>    [11]    [12]    [13]    [14]    [15]          [9986]  [9987]  [9988]  [9989] 
#>      11      12      13      14      15       :    9986    9987    9988    9989 
#>  [9990]  [9991]  [9992]  [9993]  [9994]  [9995]  [9996]  [9997]  [9998]  [9999] 
#>    9990    9991    9992    9993    9994    9995    9996    9997    9998    9999 
#> [10000] 
#>   10000 
  dim(x) <- c(100,100)
  x
#> ff (open) integer length=10000 (10000) dim=c(100,100) dimorder=c(1,2)
#>         [,1]  [,2]  [,3]  [,4]  [,5]  [,6]  [,7]  [,8]   [,93] [,94] [,95]
#> [1,]       1   101   201   301   401   501   601   701 :  9201  9301  9401
#> [2,]       2   102   202   302   402   502   602   702 :  9202  9302  9402
#> [3,]       3   103   203   303   403   503   603   703 :  9203  9303  9403
#> [4,]       4   104   204   304   404   504   604   704 :  9204  9304  9404
#> [5,]       5   105   205   305   405   505   605   705 :  9205  9305  9405
#> [6,]       6   106   206   306   406   506   606   706 :  9206  9306  9406
#> [7,]       7   107   207   307   407   507   607   707 :  9207  9307  9407
#> [8,]       8   108   208   308   408   508   608   708 :  9208  9308  9408
#> :          :     :     :     :     :     :     :     : :     :     :     :
#> [93,]     93   193   293   393   493   593   693   793 :  9293  9393  9493
#> [94,]     94   194   294   394   494   594   694   794 :  9294  9394  9494
#> [95,]     95   195   295   395   495   595   695   795 :  9295  9395  9495
#> [96,]     96   196   296   396   496   596   696   796 :  9296  9396  9496
#> [97,]     97   197   297   397   497   597   697   797 :  9297  9397  9497
#> [98,]     98   198   298   398   498   598   698   798 :  9298  9398  9498
#> [99,]     99   199   299   399   499   599   699   799 :  9299  9399  9499
#> [100,]   100   200   300   400   500   600   700   800 :  9300  9400  9500
#>        [,96] [,97] [,98] [,99] [,100]
#> [1,]    9501  9601  9701  9801   9901
#> [2,]    9502  9602  9702  9802   9902
#> [3,]    9503  9603  9703  9803   9903
#> [4,]    9504  9604  9704  9804   9904
#> [5,]    9505  9605  9705  9805   9905
#> [6,]    9506  9606  9706  9806   9906
#> [7,]    9507  9607  9707  9807   9907
#> [8,]    9508  9608  9708  9808   9908
#> :          :     :     :     :      :
#> [93,]   9593  9693  9793  9893   9993
#> [94,]   9594  9694  9794  9894   9994
#> [95,]   9595  9695  9795  9895   9995
#> [96,]   9596  9696  9796  9896   9996
#> [97,]   9597  9697  9797  9897   9997
#> [98,]   9598  9698  9798  9898   9998
#> [99,]   9599  9699  9799  9899   9999
#> [100,]  9600  9700  9800  9900  10000
  rm(x); gc()
#>           used (Mb) gc trigger  (Mb) max used  (Mb)
#> Ncells 1162442 62.1    1994352 106.6  1994352 106.6
#> Vcells 2167042 16.6    8790397  67.1  8790397  67.1