# NOT RUN {
#NOTE: missing stats implies all stats as given by pkgOptions("nlStats")
#long running examples which also require large downloads
# }
# NOT RUN {
getCtryNlData("KEN", "KEN_adm0", "VIIRS.M", ignoreMissing=NULL)
#returns either all requested data if it exists i.e. all nlPeriods
#and all nlStats for KEN otherwise NULL
# }
# NOT RUN {
# }
# NOT RUN {
getCtryNlData("KEN", "KEN_adm0", "OLS.Y", ignoreMissing=TRUE)
#Returns all requested data if it exists i.e. all nlPeriods and all
#nlStats for KEN but omits any missing data
# }
# NOT RUN {
# }
# NOT RUN {
getCtryNlData(ctryCode="KEN", "KEN_adm0", "VIIRS.Y", ignoreMissing=FALSE)
#Returns all requested data i.e. all nlPeriods and all
#nlStats for KEN. All missing data will be downloaded and processed
# }
# NOT RUN {
# }
# NOT RUN {
getCtryNlData("KEN", "KEN_adm0", "VIIRS.M", nlPeriods=c("existingNlPeriod", "missingNlPeriod"),
nlStats=c("sum", "unknownStat"), ignoreMissing=NULL)
#Returns NULL due to missingNlPeriod and unknownStat not already existing
#(ignoreMissing=NULL returns all data if exists or if any is missing returns NULL)
# }
# NOT RUN {
# }
# NOT RUN {
getCtryNlData("KEN", "KEN_adm0", "VIIRS.D", nlPeriods=c("existingNlPeriod", "missingNlPeriod"),
nlStats=c("existingStat", "missingStat"), ignoreMissing=TRUE)
#Returns existingStat for existingNlPeriods omits missingNlPeriod and missingStat
#(ignoreMissing=TRUE returns only existing data)
# }
# NOT RUN {
# }
# NOT RUN {
getCtryNlData("KEN", "KEN_adm0", "VIIRS.M", nlPeriods=c("existingNlPeriod", "missingNlPeriod"),
nlStats=c("sum", "unknownStat"), ignoreMissing=FALSE)
#Runs processNlData for missingStat in "missingNlPeriod" and returns
#"existingStat" and "missingStat" for both "existingNlPeriod" and
#"missingNlPeriod"
#(ignoreMissing=FALSE must return all data: forces processing of any missing)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab