- 追加された行はこの色です。
- 削除された行はこの色です。
[[Rの備忘録]]
[[R Through Excel A Spreadsheet Interface for Statistics, Data Analysis, and Graphics:http://www.springer.com/statistics/computational/book/978-1-4419-0051-7]] 訳出のための覚書
* 画面キャプチャ [#lae9aa4e]
Excel で範囲指定,コピーし,別セルに貼付ける画面をキャプチャする場合, PrntScrn キーだと,範囲指定されていることを表す波線が消えてしまう.Excel のコマンドにカメラなんてものもあるのだが,あまり役に立たない.そこで[[WinShot:http://www.woodybells.com/winshot.html]] で Shift + Ctril + F6 で対応.
* 準備 [#d14f0f6b]
- まずは[[著者のサイト:http://rcom.univie.ac.at/download.html]]からRExcelをダウンロードする。
- なんと R 本体まで入っていて 143 MBもある.なので,てもとの Vista から,いったん R を取り除いて,著者の説明に従ってみる.
-- しかし Vista ってのは使いにくい.もともと XP を知らないユーザー,特に高齢者の間では使いやすいという評判らしいが.
-- Rggobi まで同封されている.もっとも,本文に Rggobi の説明はない.[[Interactive and Dynamic Graphics for Data Analysis With R and GGobi:http://www.springer.com/statistics/statistical+theory+and+methods/book/978-0-387-71761-6]] をやっぱり訳すか?
- インストールだけで画面キャプチャを 50枚近く撮った.試しに Illustrator C3 で eps にする.グレースケールへの変換方法が分からん
++ [選択] で [すべてを選択]
++ [編集] -> [カラーを編集] -> [グレースケールに変換]
-- gimp の場合
++ [画像] -> [モード] -> [グレースケール]
- 別の Vista で試そうとしたら,そこから Norton Security を削除したり,あらたに Avast を入れたりとするのに,えらい時間がかかって,いっこうに進まない.横の iMac で訳稿を書き始める.
* 表記の統一 [#z4c32b69]
RExcel が,ほとんどのページでは特にフォントのしていなく使われているのだが,1ページ目の6行目だけ {\sfsmall } が使われている.
* Lattice ネタ [#q0be45d1]
ここでも掲載のコードとプロットが,ユーザーが実際に作成できるプロットと異なっていることがある.
p.298
xyplot(Shoesize ~ Size + Weight + SizeFather + SizeMother,
outer=TRUE, layout=c(2, 3),
skip=c(FALSE,FALSE,FALSE,TRUE,FALSE),
groups=Gender,
auto.key=list(border=TRUE, pch=c(17,16)),
par.settings = simpleTheme(pch=c(17,16)),
scales=list(relation='free',
x=list(limits=list(c(132,205), c(39,150),
c(132,205),
c(132,205))),
y=list(limits=c(34,50))),
data=StudentData)
は普通の設定では pch 引数が効かないので,下のコードの結果と変わらん.
xyplot(Shoesize ~ Size + Weight + SizeFather + SizeMother,
outer=TRUE, layout=c(2, 3),
skip=c(FALSE,FALSE,FALSE,TRUE,FALSE),
groups=Gender,
auto.key=list(border=TRUE) ,
scales=list(relation='free',
x=list(limits=list(c(132,205), c(39,150),
c(132,205),
c(132,205))),
y=list(limits=c(34,50))),
data=StudentData)
同じ図を描くには
xyplot(Shoesize ~ Size + Weight + SizeFather + SizeMother ,
outer=TRUE, layout=c(2, 3), pch =c(17,16), col = c(4, 6),
skip = c(FALSE,FALSE,FALSE,TRUE,FALSE),
groups = Gender,
key=list(border=TRUE, text = list(c("female","male")),
points = list(pch =c(17,16), col = c(4, 6))),
par.setting = simpleTheme(pch = c(17, 16)),
scales=list(relation = 'free',
x=list(limits=list( c(132, 205), c(39, 150),
c(132, 205),
c(132, 205))),
y=list(limits=c(34,50))), data=StudentData)