Created
March 1, 2014 12:04
-
-
Save ironpeace/9288897 to your computer and use it in GitHub Desktop.
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
# 作業ディレクトリの設定 | |
setwd("~/dev/kaggle/ds2014") | |
# CSVファイルの読み込み | |
train <- read.csv("train.csv") | |
test <- read.csv("test.csv") | |
# summary関数で変数の概要が把握できる | |
summary(train$duration_previous) | |
# Min. 1st Qu. Median Mean 3rd Qu. Max. NA's | |
# 0.000 2.000 5.000 6.004 9.000 15.000 18711 | |
# 属性値が数値の場合は、as.factorを付けて明示的に属性値として扱えるようにする | |
summary(as.factor(train$A)) | |
# 0 1 2 | |
# 143691 426067 95491 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment