算額あれこれ

算額問題をコンピュータで解きます

2012-07-01から1ヶ月間の記事一覧

Mountain Lion 用の graphviz

2012/07/31 現在で,まだ用意されていないようだ

Mountain Lion でアプリケーションのインストール

“セキュリティ”環境設定でインストールが許可されているのは、Mac App Store と確認済みの開発元からのアプリケーションのみです。 といわれる。システム環境設定を弄ってもよいが,そこに以下の示唆が表示されているので,それに従うのが無難。 開発元が不…

X11 on Mountain Lion

X11 is not included with Mountain Lion, but X11 server and client libraries for OS X Mountain Lion are available from the XQuartz project: http://xquartz.macosforge.org. You should use XQuartz version 2.7.2 or later.

あまりにも,ひどすぎるんです

「ダメ出し」シリーズをお送りしておりますが,ほとんどの人は「なんで,そんなこというの?」,「どこに問題があるっていうの?いいんじゃない?」ということだと思います。 そんな事じゃないんです。悪いんです。悪いと思わないことが悪いんです。 とだけ…

ダメ出し:間違えてるよ~

「R によるデータの統計的取り扱い/標準誤差」において したがって、回帰直線の「切片」の95%信頼区間の上限値・下限値は resultcoefficients[1] + qt(0.975, length(x)-1) * resultcoefficients[3]resultcoefficients[1] - qt(0.975, length(x)-1) * result…

ダメ出し:R の特徴を生かしたプログラミング

「割り付けがうまく行く確率」にて k <- 5p <- runif(k)p <- p/sum(p)library(gtools)cmb <- combinations(k,3)P <- rep(0,length(cmb[,1]))for(i in 1:length(cmb[,1])){ P[i] <- prod(p[cmb[i,]])} for を使わないようにというのではなく,コンパクトに書…

ダメ出し:他人の作った(ライブラリに入っている)関数の使い方はよく調べてから...

「上昇トレンドの検定 ヨンクヒール・タプストラ検定」にてSAGx というライブラリ(パッケージ)は普通にはないので,代替法を探していて,http://aoki2.si.gunma-u.ac.jp/R/Jonckheere.htmlにあるとか,cor.test で method="kendall" とするのと同じである…

Jonckheere 検定の漸近近似検定は...

cor.test(x, g, method="kendall") だということ... http://aoki2.si.gunma-u.ac.jp/R/Jonckheere.html の例題 > x <- c(+ 153, 153, 152, 156, 158, 151, 151, 150, 148, 157, # 第 1 群のデータ+ 158, 152, 152, 152, 151, 151, 157, 147, 155, 146, # 第 …

ダメ出し:整数定数,整数演算,演算順序

「R で Excel っぽい色を出す」にてexcel.like.color <- function(n) { n <- as.integer(n) : residue <- (n - 1) %% 6 + 1 quotient <- floor( (n - 1) / 6)という件があるが,整数定数,整数演算,演算順序を考えると以下の test2 で示すようにするのがよ…

ダメ出し:当たり前のことが当たり前にできるように

「幾何平均」にて max.g <- 0min.g <- 0for(i in 1:n.m){ max.g <- max.g + max(Di) min.g <- min.g + min(Di)}max.gmin.g当たり前に,max.g <- sum(sapply(D, max))min.g <- sum(sapply(D, min))と書くようにしたいものだ。

ダメ出し:つまらない繰り返しをプログラムしない

「幾何平均」で AllelesId<-NULLAllelesId1<-c("7",9,10,11,12,13,14,15,16,17,18)AllelesId2<-c("27",28,28.2,29,30,30.2,30.3,31,31.2,32,32.2,33,33.1,33.2,34,34.2)AllelesId3<-c("7",6,9,9.1,10,10.1,10.3,11,12,13,14,15)AllelesId4<-c("7",8,9,10,11,…