# This R environment comes with all of CRAN preinstalled, as well as many other helpful packages
# The environment is defined by the kaggle/rstats docker image: https://github.com/kaggle/docker-rstats
# For example, here's several helpful packages to load in 

library(ggplot2) # Data visualization
library(readr) # CSV file I/O, e.g. the read_csv function
library(MASS)
library(dplyr)
library(moments)
library(caret)
library(corrplot)
library(gbm)


# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory

system("ls ../input")

# Any results you write to the current directory are saved as output.

train_org <- read.csv("../input/train.csv")
train <- train_org

test_org <-read.csv("../input/test.csv")
test <-test_org

sample <- read.csv("../input/sample_submission.csv")
#summary(train)
#str (train)
#head(train)
#boxplot(train$GrLivArea)
# filtering the gRvliveArea it has a lot of outliers
train <-train[train$GrLivArea<=4000,]

#checking the missing data 
Missing_indices <- sapply(train,function(x)sum(is.na(x)))
#Missing_indices
Missing_Summary<-data.frame(index=names(train),Missing_values=Missing_indices)
#Missing_Summary
Missing_Summary[Missing_Summary$Missing_values > 0,]
