hip | R Documentation |
Given any starting and ending date/time objects, it generates:
1) a vector of class c("POSIXct" "POSIXt") with all the hours between the two date/time objects (both of them included), OR
2) the amount of hours between the two date/time objects
hip(from, to, date.fmt="%Y-%m-%d %H", out.type = "seq", tz="UTC")
from |
Character or POSIXct object indicating the starting date/time for creating the sequence. It has to be in the format indicated by |
to |
Character indicating the ending date/time for creating the sequence. It has to be in the format indicated by |
date.fmt |
character indicating the format in which the date/time objects are stored in |
out.type |
Character indicating the type of result that is given by this function. Valid values are: |
tz |
specification of the desired time zone yo be used. System-specific (see time zones), but |
Depending on the value of out.type
, it returns:
1) a vector of class c("POSIXct" "POSIXt")
with all the hours between from
and to
(both of them included), OR
2) the amount of hours between the two date/time objects
Mauricio Zambrano-Bigiarini, mzb.devel@gmail
dip
, mip
, yip
, diy
, timeBasedSeq
## Sequence of hours between "1961-01-01 00:00" and "1961-01-10 00:00", giving the
## starting and ending date/time objects with hours and skipping the minutes (default)
hip("1961-01-01 00", "1961-12-31 00")
## Sequence of hours between "1961-01-01 00:00" and "1961-01-10 00:00", giving the
## starting and ending date/time objects only with hours and minutes(skipping the minutes)
hip("1961-01-01 00:00", "1961-12-31 00:00", date.fmt="%Y-%m-%d %H:%M")
## Number of hours between the 10:00 AM of "1961-Jan-02" and the 11:00 AM of "1961-Jan-01",
## using "%d/%m/%Y" as date/time format.
hip("01/01/1961 10", "02/01/1961 11", date.fmt= "%d/%m/%Y %H", out.type = "nmbr")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.