search for: funcexampl

Displaying 1 result from an estimated 1 matches for "funcexampl".

Did you mean: funcexample
2011 Nov 21
0
In-place modification of a matrix
...hin a new environment. Thanks, Simon # example 1 - fast and doesn't create copies rm(list=ls()) main <- function() { matrix1 <- matrix(1.0, nrow=60000, ncol=200) if (sum(matrix1) == 12000000) { print ("OK") } else { print ("NOT OK") } funcExample <- function() eval.parent(substitute({ print(paste("Mem1", memory.size())) for (i in 1:30) { eval(parse(text="temp <- matrix1[10,]")) eval(parse(text="matrix1[10,] <- temp * 0"))...