
library('s2dverification')
# The line below should go inside the function Cluster
#library('fpc')
# 
# Here you should source as well Cluster and SeaIceModes
source('/home/nevensf/gitrep/s2dverification/R/Load.R')
source('/home/nevensf/gitrep/s2dverification/R/Cluster.R')
source('/home/nevensf/gitrep/s2dverification/R/SeaIceModes.R')

print(' ')
print('The start of SeaIceModes')
print(' ')
bubi=SeaIceModes('sit','b02s',obs=NULL,'19580101',10,12,detrended=TRUE)
print(' ')
print('The structure of bubi')
print(' ')
print(str(bubi))

##pam will be considered as a first relative of kmeans only after kmeans is full functional
##print(' ')
##print('Like the K-means analysis with K=4. but using medoids instead controids')
##print(' ')
##print(pam.results<-pam(bubi,4))
##this is also potentially useful funcation related to pam : pmak.results<-pamk(bubi))

#Now that you have built a generic call to Load, the next step would be to move the call to kmeans inside Clusters and add a call to Clusters inside SeaIceModes and start expanding the code to compute the timeseries of occurrences

