軸項目に日本語が含まれた図を EPS で出力したい場合,

>postscript("output.eps",family="Japan1GothicBBB",horizontal=FALSE)
>plot(~)
>dev.off()

とすると,output.eps に文字化けせずに出力されている.

family には,
Japan1,Japan1GothicBBB,Japan1Ryumin,Japan1HeiMin
など指定可.

horizontal を入れないと, LaTeX に取り込むとき90度回転してしまう.

その他 postscript には次の引数がある.
onefile,paper,height,width

※注
onefile = FALSE, paper = special
は真正の eps ファイルを作るために不可欠らしい

を入れるときはサイズ(height,width)を指定しないとエラーがきたり,
サイズは後から変えれるので適当でOK

as.dist() を使えばいいらしい.

例えば,以下の距離行列が書かれたcsvファイルがあったとする.

hoge.csv
-----------
a, b, c, d
0,,,
1,0,,
2,3,0,
4,5,6,0
------------

これを R で処理するには,

1.
> x <- read.table("hoge.csv", sep=",", header=TRUE)
> plot(hclust(as.dist(x)))

2.
> x <- matrix(scan("hoge.csv", sep=",", skip=1), ncol=4, byrow=TRUE)
> plot(hclust(as.dist(x)))

1と2の結果は同じ.
しかし,2の方法は左にキーがある場合は無理.左にある場合,

> x <- read.table("hoge.csv", sep=",", header=TRUE, row.names=1)


insert into テーブル名(フィールド名1, ... , フィールド名N) select ~

でいいらしい.

ex. tbl1 に tbl2 から要素追加

tbl1
+--------+---------+
| name | class |
+--------+---------+
| imo | yasai |
+--------+---------+

tbl2
+--------+---------+----------+
| name | address | sex |
+--------+---------+----------+
| taro | japan | m |
+--------+---------+----------+

mysql> insert into tbl1(name, class) select name,sex from tbl2;

結果:
mysql> select * from tbl1;
tbl1
+--------+---------+
| name | class |
+--------+---------+
| imo | yasai |
+--------+---------+
| taro | m |
+--------+---------+