[R] R idiom list? [was: Matrix transformation problem
Dietrich Trenkler
Dietrich.Trenkler at uni-osnabrueck.de
Wed Jun 11 12:35:41 CEST 2008
Dimitris Rizopoulos schrieb:
> sorry, my previous answer was not correct; you need:
>
> x <- matrix(c(1,0,0, 0,0,1, 0,1,0, 0,0,1, 0,1,0, 1,0,0),
> ncol = 3, byrow = TRUE)
> which(t(x == 1), arr.ind = TRUE)[, "row", drop = FALSE]
>
Dear helpeRs,
I would like to use this thread for a proposal which lingered in my head
for quite a while. Several years ago I was an APL aficionado and I very
much liked the idea of an APL idiom list (see e.g
http://www.pyr.fi/apl/texts/Idiot.htm).
Looking at the solution of Dimitris Rizopoulos wouldn't it be nice not to
have it disappear in the archives? To be explicit I would like to
propose an R idiom list. If there does exist one please forgive my
ignorance.
Best regards
Dietrich
--
Dietrich Trenkler c/o Universitaet Osnabrueck
Rolandstr. 8; D-49069 Osnabrueck, Germany
email: Dietrich.Trenkler at Uni-Osnabrueck.de
More information about the R-help
mailing list