search for: forestand

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

Did you mean: forestal
2011 Mar 14
2
code for "permutative" operation
...If the operation is sum() I can run x <- 5:8 m <- matrix(rep(x, length(x)), ncol=length(x)) (x.r <- rowsum(m * upper.tri(m, diag=TRUE), rep(1, length(x)))) But there's two things I don't know and kindly request help or comments upon: (1) What is the fastest code to perfom the forestanding operation? (2) Is there a more general function for tasks like this, not only with the sum procedure applied to the vector? Specifically, the zeros in the matrix may cause problems with other operations than sum. Thanks, *S* -- Sascha Vieweg, saschaview at gmail.com