# NOT RUN {
#Set a temporal working directory:
wd <- tempdir(); wd0 <- setwd(wd)
#Extract the non-blended ECA&D data and a station file from the example data folder
path2sslist<-system.file("extdata", "ECA_blend_source_ss.txt", package = "INQC")
sslist<-readr::read_lines_raw(path2sslist)
readr::write_lines(sslist,'ECA_blend_source_ss.txt')
path2ssdata<-system.file("extdata", "SS_SOUID132728.txt", package = "INQC")
#Read the sunshine data
y<-readecad(input=path2ssdata,missing= -9999)[,3:4]
options("homefolder"='./'); options("blend"=FALSE)
listonator(check=TRUE)
#Call sunafterdark()
sunafterdark(y,code='132728')
#Introduce error values in the sunshine data
y[1:10,2]<-200
#Call sunafterdark()
sunafterdark(y,code='132728')
#Return to user's working directory:
setwd(wd0)
# }
Run the code above in your browser using DataLab