Learn R Programming

phenology (version 4.0.4)

getTide: Annual tide calendar for one particular location

Description

The script extract tide information from http://tides.mobilegeographics.com/ into a data.frame. The presence of XLM package is necessary for this function.

Usage

getTide(file = NULL, year = as.POSIXlt(Sys.time())$year + 1900,
  location = 0, latitude = NA, longitude = NA, tz = "")

Arguments

file
An html file from the site http://tides.mobilegeographics.com/
year
Year to get the calendar
location
Code based on http://tides.mobilegeographics.com/
latitude
The latitude of the tide information
longitude
The longitude of the tide information
tz
Timezone

Value

  • Return a data.frame with tide calendar: Level is the tide level, Tide is the High or Low Tide information and Date.Time is the date/time in POSIXlt format.

Details

getTide gets the annual tide calendar for one particular location.

Examples

Run this code
library("phenology")
lat <- 5.74
long <- -54
Awala2004 <- getTide(year=2004, longitude=long, latitude=lat, tz="America/Cayenne")
with(Awala2004, plot(Date.Time, Level, bty="n", las=1, type="l",
xlab=paste("Year", as.POSIXlt(Date.Time[1])$year+1900),
ylab="Tide level in m"))

Run the code above in your browser using DataLab