# NOT RUN {
# }
# NOT RUN {
# Here is the sample for the first 500 locations.
# In practice, you may need more point locations and more cores.
data("allPre500","shdSeries2014")
# Get the temporal basis functions to be used in constrained optimization
season_trends=getTBasisFun(shdSeries2014,idStr="siteid",dateStr="date",
valStr="obs",df=10,n.basis=2,tbPath=NA)
#Constrained optimization
season_trends$tid=as.numeric(strftime(season_trends$date, format = "%j"))
allPre_part_filled=inter2conOpt(tarPDf=allPre500[c(1:6),],pol_season_trends=season_trends,ncore=2)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab