# 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

# 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.
library(statmod)
library(methods)
library(h2o)
print(paste("Set up Cluster",Sys.time()))
h2o.init(nthreads=-1,max_mem_size='7G')
print(paste("Load Data",Sys.time()))
## load the full training file, using all cores; load into H2O Frame known to R as train; H2O as train.hex
train<-h2o.uploadFile("../input/train.csv",destination_frame = "train.hex")
print(head(train))

one_cliente <- train[train$Cliente_ID == 15766,]
print(nrow(one_cliente))