Functions with bigger time consuming than s2dverification
I have tested s2dv::Season()
and compared to s2dverification::Season()
, it is very much slower.
An-Chi stated that a possible cause of this is because of Apply() is more efficient in big datasets.
I encourage you to post other time of execution for other s2dv functions compared to s2dverification.
Thanks,
Francesc
Attached you can find the output of my test.
> hcst <- old.data$hcst
> dim(hcst)
sweek sday syear time latitude longitude member
1 1 20 4 51 360 25
>
> ini <- Sys.time()
> hcst<-s2dverification::Season(var=hcst,posdim = 4, monini=smonth,moninf=smonth+1,monsup=smonth+3)
> print(Sys.time()-ini)
Time difference of 2.827666 secs
> #---------
> hcst <- old.data$hcst
> dim(hcst)
sweek sday syear time latitude longitude member
1 1 20 4 51 360 25
>
> ini <- Sys.time()
> hcst<-s2dv::Season(data=hcst,time_dim = "time", monini=smonth,moninf=smonth+1,monsup=smonth+3)
> print(Sys.time()-ini)
Time difference of 20.031 mins