in_ff: Perform chunked expression within an ff_matrix object

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Perform chunked expression within an ff_matrix object

Usage

1
in_ff(X, expr, by = 500, ...)

Arguments

X

An ff_matrix

expr

The expression to evaluate

by

Chunk size

...

Further arguments

Value

X

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
mymat <- ff(vmode="double", dim=c(50,50))
mymat[4,5] <- 3
mymat[5,5] <- 4
mymat[46, 46] <- 1
in_ff(mymat, mymat[mymat > 2] <- 7)

mymat

fun <- function(x) 2*x
in_ff(mymat, mymat[mymat > 2] <- fun(mymat[mymat > 2]))

mymat

r<- 8
in_ff(mymat, mymat[mymat > 2] <- r)

mymat

meowcat/fastliclust documentation built on May 22, 2019, 6:51 p.m.