Learn R Programming

Rnightlights (version 0.2.4)

validNlPeriods: Check if an nlPeriod is valid for a given nightlight type

Description

Check if an nlPeriod is valid for a given nightlight type. Vectorized to allow checking multiple nlPeriods of corresponding nlTypes. If a single nlType is given all nlPeriods are checked in that nlType. If multiple nlTypes are given, then a corresponding number of nlPeriods is expected e.g. if nlPeriods is a vector each entry must correspond to the nlType. If multiple nlPeriods are to be tested per nlType then a list of vectors is expected, one for each nlType.

Usage

validNlPeriods(nlPeriods, nlTypes)

Arguments

nlPeriods

the nlPeriods of interest

nlTypes

type of nightlight

Value

named logical list of TRUE/FALSE

Examples

Run this code
# NOT RUN {
validNlPeriods(c("201401", "201402"),"VIIRS.M")
 #returns
 #$VIIRS.M
 #201401 201402 
 #  TRUE   TRUE

validNlPeriods("201203","VIIRS.M")
 #returns FALSE

validNlPeriods("2012","OLS.Y")
 #returns TRUE

# }

Run the code above in your browser using DataLab