~hrbrmstr/daybreak

daybreak/R/validators.R -rw-r--r-- 237 bytes
efb76800hrbrmstr README 1 year, 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
valid_date <- function(date) {
  as.POSIXlt(date[1])
}

valid_lon <- function(lon) {
  lon <- lon[1]
  stopifnot(lon >= -180 & lon <= 180)
  lon
}

valid_lat <- function(lat) {
  lat <- lat[1]
  stopifnot(lat >= -90 & lat <= 90)
  lat
}