Write a file from a Filebacked Big Matrix (by parts).

big_write(
  X,
  file,
  every_nrow,
  ...,
  ind.row = rows_along(X),
  ind.col = cols_along(X),
  progress = FALSE
)

Arguments

X

An object of class FBM.

file

File to write to.

every_nrow

Number of rows to write at once.

...

Other arguments to be passed to data.table::fwrite, except x, file, append, row.names, col.names and showProgress.

ind.row

An optional vector of the row indices that are used. If not specified, all rows are used. Don't use negative indices.

ind.col

An optional vector of the column indices that are used. If not specified, all columns are used. Don't use negative indices.

progress

Show progress? Default is FALSE.

Value

Input parameter file, invisibly.

Examples

X <- big_attachExtdata()
csv <- big_write(X, tempfile(), every_nrow = 100, progress = interactive())