Description Usage Arguments Details Value Author(s)
Add GPS Lat / Long to a variety of types of data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | addGps(x, gps = NULL, thresh = 3600, ...)
## S4 method for signature 'data.frame'
addGps(x, gps = NULL, thresh = 3600, ...)
## S4 method for signature 'AcousticEvent'
addGps(x, gps = NULL, thresh = 3600, ...)
## S4 method for signature 'list'
addGps(x, gps = NULL, thresh = 3600, ...)
## S4 method for signature 'AcousticStudy'
addGps(x, gps = NULL, thresh = 3600, ...)
## S4 method for signature 'ANY'
addGps(x, gps = NULL, thresh = 3600, ...)
|
x |
data to add GPS coordinates to. Must have a column |
gps |
a data frame of GPS coordinates to match to data from |
thresh |
maximum time in seconds for matching GPS coordinates to data. |
... |
additional arguments for other methods |
Latitude and Longitude coordinates will be matched to the data
by using data.tables rolling join with roll='nearest'
. After the
join is done, the time difference between the matched rows is checked
and any that are greater than the set threshold are set to NA. This is
done to prevent accidentally matching weird things if an incomplete set
of GPS data is provided.
If x
is an AcousticEvent or AcousticStudy,
then gps
can be omitted and will be read from the databases contained
in the files
slot of x
. If x
is an AcousticStudy,
then the gps data will also be saved to the gps
slot of the object, and
an additional argument bounds
can be provided. This is a length two vector
of POSIXct
class times that will bound the times of gps data to store, gps
data outside this range will not be stored (to reduce the potentially very large
amount of data stored in the gps
slot)
the same data as x
, with Lat/Long data added
Taiki Sakai taiki.sakai@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.