dataToRanges: Create List of the Ranges of Coordinates

Description Usage Arguments Value Author(s) Examples

View source: R/dataToRanges.R

Description

Creates a named list with the ranges of Longitude, Latitude, and Time (UTC) data for use in functions like formatURL. Can also specify an amount to buffer the min and max values by for each coordinate

Usage

1
dataToRanges(data, buffer = c(0, 0, 0))

Arguments

data

a data frame with longitude, latitude, and time (UTC) columns

buffer

a vector of the amount to buffer the min and max values of Longitude, Latitude, and UTC by (in that order)

Value

a list with the ranges of coordinates for Longitude, Latitude, and UTC. Ranges are listed as c(left, right), so if your data spans across the dateline

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

1
2
3
4
5
6
7
8
gps <- data.frame(Latitude = c(32, 32.1, 32.2, 32.2, 32.2),
                  Longitude = c(-110, -110.1, -110.2, -110.3, -110.4),
                  UTC = as.POSIXct(c('2000-01-01 00:00:00', '2000-01-01 00:00:10',
                                     '2000-01-01 00:00:20', '2000-01-01 00:00:30',
                                     '2000-01-01 00:00:40')))
dataToRanges(gps)

dataToRanges(gps, buffer = c(.05, .05, 86400))

PAMmisc documentation built on Oct. 8, 2021, 9:08 a.m.