2012-12-10から1日間の記事一覧

GNU Rで多くの配列を結合する

do.call("rbind", listOfMatrices) [ネタ元] http://pj.freefaculty.org/R/Rtips.html#toc-Subsection-3.15

GNU Rでリストに要素を後から付け加える

Lst Lst\[\[1\]\] [ネタ元] http://www.okada.jp.org/RWiki/?%A5%EA%A5%B9%A5%C8Tips%C2%E7%C1%B4#ha6b47d4

GNU Rの配列で条件に沿った添字を取り出し

whichを使うとかなりいろいろなことができる: tmpMatrix which(tmpMatrix[,1] == 2) tmpMatrix[which(tmpMatrix[,1] == 2) ,] which(tmpMatrix[,1] == 10 & tmpMatrix[,2] == 20) tmpMatrix[which(tmpMatrix[,1] == 10 & tmpMatrix[,2] == 20),] which(tmpM…