Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

flush-methods

Updating a big.matrix filebacking.


Description

For a file-backed big.matrix object, flush() forces any modified information to be written to the file-backing.

Usage

flush(con)

## S4 method for signature 'big.matrix'
flush(con)

Arguments

con

filebacked big.matrix.

Details

This function flushes any modified data (in RAM) of a file-backed big.matrix to disk. This may be useful for improving performance in cases where allowing the operating system to decide on flushing creates a bottleneck (likely near the threshold of available RAM).

Value

TRUE or FALSE (invisible), indicating whether or not the flush was successful.

Author(s)

John W. Emerson and Michael J. Kane

Examples

temp_dir = tempdir()
if (!dir.exists(temp_dir)) dir.create(temp_dir)
x <- big.matrix(nrow=3, ncol=3, backingfile='flushtest.bin',
                descriptorfile='flushtest.desc', backingpath=temp_dir,
                type='integer')
x[1,1] <- 0
flush(x)

bigmemory

Manage Massive Matrices with Shared Memory and Memory-Mapped Files

v4.5.36
LGPL-3 | Apache License 2.0
Authors
Michael J. Kane <kaneplusplus@gmail.com>, John W. Emerson <jayemerson@gmail.com>, Peter Haverty <haverty.peter@gene.com>, and Charles Determan Jr. <cdetermanjr@gmail.com>
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.