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

Description Usage Arguments Value Examples

View source: R/nlperiod.R

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

1
validNlPeriods(nlPeriods, nlTypes)

Arguments

nlPeriods

the nlPeriods of interest

nlTypes

type of nightlight

Value

named logical list of TRUE/FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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

Rnightlights documentation built on Aug. 29, 2019, 5:02 p.m.