Learn R Programming

bigstatsr (version 1.1.4)

big_transpose: Transposition

Description

This function implements a simple cache-oblivious algorithm for the transposition of a Filebacked Big Matrix.

Usage

big_transpose(X, backingfile = tempfile())

Arguments

X

A FBM.

backingfile

Path to the file storing the Big Matrix on disk. An extension ".bk" will be automatically added. Default stores in the temporary directory.

Value

The new transposed Filebacked Big Matrix (or its descriptor). Its dimensions and type are automatically determined from the input Filebacked Big Matrix.

Examples

Run this code
# NOT RUN {
X <- FBM(10, 5, init = rnorm(50))
X[]
Xt <- big_transpose(X)
identical(t(X[]), Xt[])

X <- big_attachExtdata()
Xt <- big_transpose(X)
identical(t(X[]), Xt[])

# }

Run the code above in your browser using DataLab