Learn R Programming

houba (version 0.1.0)

dim: Change object dimensions

Description

Change object dimensions

Usage

# S4 method for memoryMapped,numeric
dim(x) <- value

# S4 method for memoryMapped,NULL dim(x) <- value

Arguments

x

a memory mapped object

value

or NULL new dimensions

Details

The new dimensions must match the object size. This function can change the class of the object, e.g. from mvector to mmatrix or the reverse.

If the value is NULL, then x is turned into a mvector.

Examples

Run this code
x <- as.mvector(1:6)
x
dim(x) <- 2:3
x
dim(x) <- NULL
x

Run the code above in your browser using DataLab