自分の使い方をまとめる
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
seq(as.Date("2013-01-01"), len=12, by="1 month") | |
# [1] "2013-01-01" "2013-02-01" "2013-03-01" "2013-04-01" "2013-05-01" "2013-06-01" "2013-07-01" "2013-08-01" | |
# [9] "2013-09-01" "2013-10-01" "2013-11-01" "2013-12-01" | |
seq(as.Date("2013-01-01"), len=12, by="-1 month") | |
# [1] "2013-01-01" "2012-12-01" "2012-11-01" "2012-10-01" "2012-09-01" "2012-08-01" "2012-07-01" "2012-06-01" | |
# [9] "2012-05-01" "2012-04-01" "2012-03-01" "2012-02-01" | |
# 文字列日付 --> 1ヶ月前の日付に | |
tail(seq(as.Date("2013-09-30"), len=2, by="-1 month"),1) |
- No.03212 複数のデータフレームを併合
- [1] 「<<-」 は「永続代入」で、グローバル変数に対して代入する場合に利用するらしい
- ローカル変数と永続代入<<- R-Source http://cse.naro.affrc.go.jp/takezawa/r-tips/r/32.html
この記事はVOYAGE GROUP エンジニアブログ : Advent Calendar 2013 の5日目の記事になります!
すっかり寒くなりましたね。 こんな寒い冬はこたつに入ってアイスクリームを食べるのが一番です。
- 書籍
- http://www.amazon.co.jp/dp/400006973X
- 6.4 ロジスティック回帰とロジットリンク関数
- http://www.amazon.co.jp/dp/400006973X
- ウェブ
logistic <- function(z) 1/(1 + exp(-z))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install.packages("party") | |
library("party") | |
# ?ctree | |
irisct <- ctree(Species ~ .,data = iris) | |
irisct | |
plot(irisct) |
OlderNewer