block_size: Determine a correct value for the block.size parameter

Description Usage Arguments Value Examples

View source: R/utils.R

Description

It determines the value of block.size such that a matrix of doubles of size n x block.size takes less memory than getOption("bigstatsr.block.sizeGB") GigaBytes (default is 1GB).

Usage

1
block_size(n, ncores = 1)

Arguments

n

The number of rows.

ncores

The number of cores.

Value

An integer >= 1.

Examples

1
2
3
block_size(1e3)
block_size(1e6)
block_size(1e6, 6)

Example output

sh: 1: wc: Permission denied
[1] 134217
[1] 134
[1] 22

bigstatsr documentation built on April 5, 2021, 5:08 p.m.