Learn R Programming

bigstatsr (version 0.6.2)

big_write: Write a file

Description

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

Usage

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

Arguments

X

A FBM.

file

File to write to.

every_nrow

Number of rows to write at once.

...

Other arguments to be passed to data.table::fwrite, excepted 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

Run this code
# NOT RUN {
X <- big_attachExtdata()
csv <- big_write(X, tempfile(), every_nrow = 100, progress = interactive())
# }

Run the code above in your browser using DataLab