[R] R: how to do this?
Luca Braglia
braglia at poleis.eu
Fri Sep 11 11:12:11 CEST 2009
> Da: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
> Per conto di Luca Braglia
> Inviato: venerdì 11 settembre 2009 10.17
> A: r-help at r-project.org
> Oggetto: [R] how to do this?
> in this case the ouput should be
>
> 2
> 16
> 12
>
Obviously this ....
id.match = rep(0, nrow(y))
for (indice in 1:nrow(y)) {
id.match[indice] <- y[indice, x[indice]] } id.match
... works, but it's not that good solution (especially for big data.frame)
Thank you
More information about the R-help
mailing list