My online activities
検索
以前の記事
2013年 02月 2013年 01月 2012年 03月 2012年 02月 2012年 01月 2011年 12月 2011年 11月 2011年 10月 2011年 09月 2011年 08月 2011年 07月 2011年 06月 2011年 05月 2011年 02月 2011年 01月 2010年 12月 2010年 11月 2010年 10月 2010年 09月 2010年 08月 2010年 07月 2010年 06月 2010年 05月 2010年 04月 2010年 03月 2010年 02月 2010年 01月 2009年 12月 2009年 11月 2009年 10月 2009年 09月 2009年 08月 2009年 07月 2009年 06月 2009年 05月 2009年 04月 2009年 03月 2009年 02月 2009年 01月 2008年 12月 2008年 11月 2008年 10月 2008年 09月 2008年 08月 2008年 07月 2008年 06月 2008年 05月 2008年 04月 2008年 03月 2008年 02月 2008年 01月 2007年 12月 2007年 11月 2007年 10月 2007年 09月 2007年 08月 2007年 07月 2007年 06月 2007年 05月 2007年 04月 2007年 03月 2007年 02月 2007年 01月 2006年 12月 2006年 11月 2006年 10月 2006年 09月 2006年 08月 2006年 07月 2006年 06月 2006年 05月 2006年 04月 2006年 03月 2006年 02月 2006年 01月 2005年 12月 2005年 11月 2005年 10月 2005年 09月 2005年 08月 2005年 07月 2005年 06月 2005年 05月 2005年 04月 2005年 03月 2005年 02月 2005年 01月 2004年 12月 2004年 11月 2004年 10月 2004年 09月 2004年 08月 2004年 07月 2001年 01月 カテゴリ
全体 Math Science Book Log Misc Business Music IT Food Topic Movie Art Stat Politics Muttering Off Topic 未分類 ブログパーツ
その他のジャンル
ファン
記事ランキング
ブログジャンル
画像一覧
|
2010年 09月 06日
Tronto大のRadford Nealのブログエントリである。
Two Surpising Things about R http://bit.ly/bQrOTk ... But it turns out that in R you can use both parentheses and curly brackets! The curly brackets are normally used to group statements, but an expression is one type of statement, and the last (or only) in the group provides the value. Rの数式表現にはカーリーブラケット { }もパーレン( )もどちらも使えるのだが、カーリーブラケットの方が計算が速くなるそうだ。 早速僕のiMacでも試してみよう。 > a <- 5; b <- 1; c <- 4 ほんとだ。0.2sec違う。Radford Nealの結果と同じくらいだ。へえ。今度からカーリーブラケットでコーディングするか。 あと、これはR 2.11.1のr52822という特定バージョンのモンキーパッチになってしまうが、同じくRadford Nealが作成した、高速化のためのパッチが以下にある。 http://www.cs.toronto.edu/~radford/R-mods.html もちろんパッチにあてたあとに./configure, makeが必要だ。
by yutakashino
| 2010-09-06 22:12
| Stat
|
ファン申請 |
||