Subset parts of bigdist
bigdist_subset(x, index, file)
x | Object of class 'bigdist' |
---|---|
index | Indexes of the bigdist to be subset as a bigdist |
file | (string) Name of the backing file to be created. Do not include trailing ".bk". See details for the backup file format. |
The filename format is of the form <somename>_<size>_<type>.bk where size is the number of observations and type is the data type like 'double', 'float'.
set.seed(1) amat <- matrix(rnorm(1e3), ncol = 10) td <- tempdir() temp <- bigdist(mat = amat, file = file.path(td, "temp_ex8"))#>#>#>#>#>#>#> $fbm #> A Filebacked Big Matrix of type 'float' with 10 rows and 10 columns. #> #> attr(,"class") #> [1] "bigdist"temp_subset$fbm$backingfile#> [1] "/tmp/RtmpNBdlQr/temp_ex9_10_float.bk"