Dear R community,

I am working with huge arrays, so I spend a lot of time computing. This is
my code:

for (x in 1:dim(variable)[1]){
    for (y in 1:dim(variable)[2]){
        for (z in 1:dim(variable)[3]){
            result <- max(variable[x,y,z,])
        }
    }
}

Is there a more efficient procedure to do this task?

Thanks in advance!

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to