ExtractR Documentation

Extract Parts of an object

Description

Operators acting on FlashR vectors and matrices to extract parts of the objects.

Usage

## S4 method for signature 'fm,ANY,missing,ANY'
x[i, j, drop = TRUE]

## S4 method for signature 'fm,missing,ANY,ANY'
x[i, j, drop = TRUE]

## S4 method for signature 'fm,ANY,ANY,ANY'
x[i, j, drop = TRUE]

## S4 method for signature 'fmV,ANY,ANY,ANY'
x[i]

## S4 replacement method for signature 'fm,ANY,missing,ANY'
x[i, j] <- value

## S4 replacement method for signature 'fm,missing,ANY,ANY'
x[i, j] <- value

Arguments

x

object from which to extract elements.

i, j

indices specifying elements to extract. Indices are integer or numeric vectors.

drop

for matrices. If TRUE, the result is coerced to a vector.

value

a FlashR vector or matrix that contains new data for the rows

Details

FlashR supports extracting data from an object as well as replacing data of a matrix. To assign data in a matrix, it only supports setting the entire rows or columns.

Examples

mat <- fm.runif.matrix(100, 10)
mat[1:5,]
mat[,1:5]
mat[1:5,1:5]
mat[,1] <- fm.runif(nrow(mat))