2010-11-01から1ヶ月間の記事一覧

WindowsでSBCLをビルド

SBCLは, Common Lisp処理系の中では早いらしい でも, 公式に配布されているWindows用バイナリは This is experimental prerelease support for the Windows platform: use at your own risk. "Your Kitten of Death awaits!"というメッセージが(--noinformし…

Rで2進数表示に変換

正整数を2進数の文字列に変換する方法が見つけられなかったので作ってみた. けど, いつ使うのだろう..正整数xのk桁の2進数表示を各桁のベクトルにして返す # 正整数xをk桁の2進数(ベクトルで表現)に変換する to_bin <- function(k, x){ if(k <= 0 && x <= 0)…

Rで標準入力を受け取る

Ideoneでデータを渡すときのためにメモめもread.table("stdin")を呼ぶと中でfile("stdin")が呼ばれて, stdinからデータが読み込まれる. http://stat.ethz.ch/R-manual/R-devel/library/utils/html/read.table.html # 標準入力からデータ読みこみ x <- read.t…