[R] eval parse question

2012-06-20 Thread Leuzinger Sebastian
Dear all Is there a more efficient way of achieving the following (assigning to an indexed vector in a loop): test5 <- 1:10 eval(parse(text=paste("test",5,"[",7,"]<- ",0.435,sep=""))) this works, but it is probably very slow. Thanks Sebastian Leuzinger _

[R] aggregate arrays

2012-02-03 Thread Leuzinger Sebastian
Dear list after quite a bit of research in the archive, I gave up. This seems to be a simple problem: I would like to aggregate a (3-dimensional) array, either by another array, or by a vector, indicating the dimension which should be aggregated. I don't think I have to provide an example, it