Hi,

        I would like to write something similar to:
for(t in 1:100)
        v[x[t]] <- v[y[t]] + v[z[t]]
in a vectorized form. The x, y, and z vectors may contain duplicates (so v[x] 
<- v[y] + v[z] has different semantics). The for loop is not efficient enough 
for my purposes and I would like to avoid using C/Fortran.

        This problem occurred to me on several occasions and I feel it is quite 
general. Does anyone have an idea how to solve it nicely?

        Thanks,
        bk

______________________________________________
R-help@stat.math.ethz.ch 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