Permalink
Browse files

re-roxygenise

  • Loading branch information...
1 parent 0f624d0 commit a61cae19b5f8d8e33e1b01e72c268f10824a7951 @vspinu vspinu committed Aug 1, 2012
Showing with 486 additions and 191 deletions.
  1. +2 −0 NAMESPACE
  2. +20 −20 man/Duration-class.Rd
  3. +30 −30 man/Interval-class.Rd
  4. +38 −38 man/Period-class.Rd
  5. +1 −1 man/Timespan-class.Rd
  6. +1 −1 man/am.Rd
  7. +3 −3 man/dst.Rd
  8. +7 −6 man/hm.Rd
  9. +15 −7 man/hms.Rd
  10. +1 −1 man/hour.Rd
  11. +22 −0 man/lubridate_formats.Rd
  12. +1 −1 man/minute.Rd
  13. +1 −1 man/month.Rd
  14. +13 −7 man/ms.Rd
  15. +185 −0 man/parseDateTime.Rd
  16. +10 −34 man/parse_date.Rd
  17. +1 −1 man/second.Rd
  18. +1 −1 man/tz.Rd
  19. +1 −1 man/week.Rd
  20. +1 −1 man/year.Rd
  21. +55 −23 man/ymd.Rd
  22. +77 −14 man/ymd_hms.Rd
View
@@ -123,6 +123,7 @@ export(is.period)
export(is.timepoint)
export(is.timespan)
export(leap_year)
+export(lubridate_formats)
export(make_difftime)
export(mday)
export(mdy)
@@ -143,6 +144,7 @@ export(new_interval)
export(new_period)
export(now)
export(origin)
+export(parseDateTime)
export(parse_date)
export(period)
export(period_to_seconds)
View
@@ -1,39 +1,39 @@
\name{Duration-class}
\alias{-,ANY,Duration-method}
-\alias{-,Duration,missing-method}
-\alias{[,Duration-method}
-\alias{[<-,Duration,ANY-method}
\alias{*,ANY,Duration-method}
-\alias{*,Duration,ANY-method}
-\alias{/,difftime,Duration-method}
-\alias{/,Duration,difftime-method}
-\alias{/,Duration,Duration-method}
-\alias{/,Duration,Interval-method}
-\alias{/,Duration,numeric-method}
-\alias{/,Duration,Period-method}
-\alias{/,numeric,Duration-method}
-\alias{\%\%,Duration,Duration-method}
-\alias{\%\%,Duration,Interval-method}
-\alias{\%\%,Duration,Period-method}
+\alias{as.difftime,Duration-method}
+\alias{as.numeric,Duration-method}
+\alias{c,Duration-method}
\alias{+,Date,Duration-method}
+\alias{/,difftime,Duration-method}
\alias{+,difftime,Duration-method}
+\alias{[<-,Duration,ANY-method}
+\alias{*,Duration,ANY-method}
+\alias{Duration-class}
\alias{+,Duration,Date-method}
+\alias{/,Duration,difftime-method}
\alias{+,Duration,difftime-method}
+\alias{/,Duration,Duration-method}
+\alias{\%\%,Duration,Duration-method}
\alias{+,Duration,Duration-method}
+\alias{/,Duration,Interval-method}
+\alias{\%\%,Duration,Interval-method}
\alias{+,Duration,Interval-method}
+\alias{[,Duration-method}
+\alias{$<-,Duration-method}
+\alias{$,Duration-method}
+\alias{-,Duration,missing-method}
+\alias{/,Duration,numeric-method}
\alias{+,Duration,numeric-method}
+\alias{/,Duration,Period-method}
+\alias{\%\%,Duration,Period-method}
\alias{+,Duration,Period-method}
\alias{+,Duration,POSIXct-method}
\alias{+,Duration,POSIXlt-method}
+\alias{/,numeric,Duration-method}
\alias{+,numeric,Duration-method}
\alias{+,POSIXct,Duration-method}
\alias{+,POSIXlt,Duration-method}
-\alias{$,Duration-method}
-\alias{$<-,Duration-method}
-\alias{as.difftime,Duration-method}
-\alias{as.numeric,Duration-method}
-\alias{c,Duration-method}
-\alias{Duration-class}
\alias{rep,Duration-method}
\alias{show,Duration-method}
\title{Duration class}
View
@@ -1,50 +1,50 @@
\name{Interval-class}
+\alias{*,ANY,Interval-method}
+\alias{as.difftime,Interval-method}
+\alias{as.numeric,Interval-method}
+\alias{c,Interval-method}
\alias{-,Date,Interval-method}
+\alias{+,Date,Interval-method}
+\alias{/,difftime,Interval-method}
+\alias{+,difftime,Interval-method}
\alias{-,Duration,Interval-method}
-\alias{-,Interval,Date-method}
-\alias{-,Interval,Interval-method}
-\alias{-,Interval,missing-method}
-\alias{-,Interval,numeric-method}
-\alias{-,Interval,POSIXct-method}
-\alias{-,Interval,POSIXlt-method}
-\alias{-,numeric,Interval-method}
-\alias{-,Period,Interval-method}
-\alias{-,POSIXct,Interval-method}
-\alias{-,POSIXlt,Interval-method}
-\alias{[,Interval-method}
+\alias{intersect,Interval,Interval-method}
\alias{[<-,Interval,ANY-method}
-\alias{*,ANY,Interval-method}
\alias{*,Interval,ANY-method}
-\alias{/,difftime,Interval-method}
+\alias{Interval-class}
+\alias{-,Interval,Date-method}
+\alias{+,Interval,Date-method}
\alias{/,Interval,difftime-method}
+\alias{+,Interval,difftime-method}
\alias{/,Interval,Duration-method}
-\alias{/,Interval,Interval-method}
-\alias{/,Interval,numeric-method}
-\alias{/,Interval,Period-method}
-\alias{/,numeric,Interval-method}
\alias{\%\%,Interval,Duration-method}
-\alias{\%\%,Interval,Interval-method}
-\alias{\%\%,Interval,Period-method}
-\alias{+,Date,Interval-method}
-\alias{+,difftime,Interval-method}
-\alias{+,Interval,Date-method}
-\alias{+,Interval,difftime-method}
\alias{+,Interval,Duration-method}
+\alias{-,Interval,Interval-method}
+\alias{/,Interval,Interval-method}
+\alias{\%\%,Interval,Interval-method}
\alias{+,Interval,Interval-method}
+\alias{[,Interval-method}
+\alias{$<-,Interval-method}
+\alias{$,Interval-method}
+\alias{-,Interval,missing-method}
+\alias{-,Interval,numeric-method}
+\alias{/,Interval,numeric-method}
\alias{+,Interval,numeric-method}
+\alias{/,Interval,Period-method}
+\alias{\%\%,Interval,Period-method}
\alias{+,Interval,Period-method}
+\alias{-,Interval,POSIXct-method}
\alias{+,Interval,POSIXct-method}
+\alias{-,Interval,POSIXlt-method}
\alias{+,Interval,POSIXlt-method}
+\alias{-,numeric,Interval-method}
+\alias{/,numeric,Interval-method}
\alias{+,numeric,Interval-method}
+\alias{-,Period,Interval-method}
+\alias{-,POSIXct,Interval-method}
\alias{+,POSIXct,Interval-method}
+\alias{-,POSIXlt,Interval-method}
\alias{+,POSIXlt,Interval-method}
-\alias{$,Interval-method}
-\alias{$<-,Interval-method}
-\alias{as.difftime,Interval-method}
-\alias{as.numeric,Interval-method}
-\alias{c,Interval-method}
-\alias{intersect,Interval,Interval-method}
-\alias{Interval-class}
\alias{rep,Interval-method}
\alias{setdiff,Interval,Interval-method}
\alias{show,Interval-method}
View
@@ -1,57 +1,57 @@
\name{Period-class}
\alias{-,ANY,Period-method}
-\alias{-,Period,missing-method}
-\alias{!=,Duration,Period-method}
-\alias{!=,Period,Duration-method}
-\alias{!=,Period,Period-method}
-\alias{[,Period-method}
-\alias{[<-,Period,Period-method}
\alias{*,ANY,Period-method}
-\alias{*,Period,ANY-method}
-\alias{/,difftime,Period-method}
-\alias{/,numeric,Period-method}
-\alias{/,Period,difftime-method}
-\alias{/,Period,Duration-method}
-\alias{/,Period,Interval-method}
-\alias{/,Period,numeric-method}
-\alias{/,Period,Period-method}
-\alias{\%\%,Period,Duration-method}
-\alias{\%\%,Period,Interval-method}
-\alias{\%\%,Period,Period-method}
+\alias{as.difftime,Period-method}
+\alias{as.numeric,Period-method}
+\alias{c,Period-method}
\alias{+,Date,Period-method}
+\alias{/,difftime,Period-method}
\alias{+,difftime,Period-method}
+\alias{<=,Duration,Period-method}
+\alias{<,Duration,Period-method}
+\alias{==,Duration,Period-method}
+\alias{>=,Duration,Period-method}
+\alias{>,Duration,Period-method}
+\alias{!=,Duration,Period-method}
+\alias{/,numeric,Period-method}
\alias{+,numeric,Period-method}
+\alias{*,Period,ANY-method}
+\alias{Period-class}
\alias{+,Period,Date-method}
+\alias{/,Period,difftime-method}
\alias{+,Period,difftime-method}
+\alias{<=,Period,Duration-method}
+\alias{<,Period,Duration-method}
+\alias{==,Period,Duration-method}
+\alias{>=,Period,Duration-method}
+\alias{>,Period,Duration-method}
+\alias{!=,Period,Duration-method}
+\alias{/,Period,Duration-method}
+\alias{\%\%,Period,Duration-method}
\alias{+,Period,Duration-method}
+\alias{/,Period,Interval-method}
+\alias{\%\%,Period,Interval-method}
\alias{+,Period,Interval-method}
+\alias{[,Period-method}
+\alias{$<-,Period-method}
+\alias{$,Period-method}
+\alias{-,Period,missing-method}
+\alias{/,Period,numeric-method}
\alias{+,Period,numeric-method}
+\alias{<=,Period,Period-method}
+\alias{<,Period,Period-method}
+\alias{==,Period,Period-method}
+\alias{>=,Period,Period-method}
+\alias{>,Period,Period-method}
+\alias{!=,Period,Period-method}
+\alias{/,Period,Period-method}
+\alias{[<-,Period,Period-method}
+\alias{\%\%,Period,Period-method}
\alias{+,Period,Period-method}
\alias{+,Period,POSIXct-method}
\alias{+,Period,POSIXlt-method}
\alias{+,POSIXct,Period-method}
\alias{+,POSIXlt,Period-method}
-\alias{<,Duration,Period-method}
-\alias{<,Period,Duration-method}
-\alias{<,Period,Period-method}
-\alias{<=,Duration,Period-method}
-\alias{<=,Period,Duration-method}
-\alias{<=,Period,Period-method}
-\alias{==,Duration,Period-method}
-\alias{==,Period,Duration-method}
-\alias{==,Period,Period-method}
-\alias{>,Duration,Period-method}
-\alias{>,Period,Duration-method}
-\alias{>,Period,Period-method}
-\alias{>=,Duration,Period-method}
-\alias{>=,Period,Duration-method}
-\alias{>=,Period,Period-method}
-\alias{$,Period-method}
-\alias{$<-,Period-method}
-\alias{as.difftime,Period-method}
-\alias{as.numeric,Period-method}
-\alias{c,Period-method}
-\alias{Period-class}
\alias{rep,Period-method}
\alias{show,Period-method}
\title{Period class}
View
@@ -1,7 +1,7 @@
\name{Timespan-class}
+\alias{Timespan-class}
\alias{*,Timespan,Timespan-method}
\alias{\%/\%,Timespan,Timespan-method}
-\alias{Timespan-class}
\title{Timespan class}
\description{
Timespan is an S4 class with no slots. It is extended by
View
@@ -16,7 +16,7 @@
Does date time occur in the am or pm?
}
\examples{
-x <- now()
+x <- ymd("2012-03-26")
am(x)
pm(x)
}
View
@@ -8,8 +8,8 @@
\item{x}{a date-time object}
}
\value{
- Daylight savings time flag. Positive if in force, zero if
- not, negative if unknown.
+ A logical. TRUE if DST is in force, FALSE if not, NA if
+ unknown.
}
\description{
Date-time must be a POSIXct, POSIXlt, Date, chron,
@@ -22,7 +22,7 @@
and hour values.
}
\examples{
-x <- now()
+x <- ymd("2012-03-26")
dst(x)
}
\keyword{chron}
View
@@ -5,16 +5,17 @@
hm(...)
}
\arguments{
- \item{...}{a character vector of hour minute pairs}
+ \item{...}{character or numeric vectors of hour minute
+ pairs}
}
\value{
- a vector of period objects
+ a vector of class \code{Period}
}
\description{
- Transforms a character string into a period object with
- the specified number of hours and minutes. hm()
- recognizes all non-alphanumeric separators of length 1
- with the exception of ".".
+ Transforms a character or numeric vectors into a period
+ object with the specified number of hours and minutes.
+ hm() recognizes all non-alphanumeric separators, and no
+ separator.
}
\examples{
x <- c("09:10", "09:02", "1:10")
View
@@ -2,27 +2,35 @@
\alias{hms}
\title{Create a period with the specified hours, minutes, and seconds}
\usage{
- hms(...)
+ hms(..., missing = 0, frac = FALSE)
}
\arguments{
\item{...}{a character vector of hour minute second
triples}
+
+ \item{missing}{integer, number of formats that can be
+ missing. See \code{\link{parseDateTime}}.}
+
+ \item{frac}{If \code{TRUE}, fractional seconds are
+ allowed. It is assumed that fractional seconds are
+ separated by ".". If \code{TRUE}, "." cannot be used as a
+ separator between minutes and seconds.}
}
\value{
a vector of period objects
}
\description{
- Transforms a character string into a period object with
- the specified number of hours, minutes, and seconds.
- hms() recognizes all non-alphanumeric separators of
- length 1 with the exception of ".".
+ Transforms a character or numeric vector into a period
+ object with the specified number of hours, minutes, and
+ seconds. hms() recognizes all non-alphanumeric
+ separators, as well as no separator.
}
\examples{
x <- c("09:10:01", "09:10:02", "09:10:03")
hms(x)
# [1] 9 hours, 10 minutes and 1 second 9 hours, 10 minutes and 2 seconds 9 hours, 10 minutes and 3 seconds
-hms("7 6 5")
-# [1] 7 hours, 6 minutes and 5 seconds
+hms("7 6 5", "3-23---2", "2 : 23 : 33")
+## 7 hours, 6 minutes and 5 seconds 3 hours, 23 minutes and 2 seconds 2 hours, 23 minutes and 33 seconds
}
\seealso{
\code{\link{hm}, \link{ms}}
View
@@ -17,7 +17,7 @@
jul, timeSeries, and fts objects.
}
\examples{
-x <- now()
+x <- ymd("2012-03-26")
hour(x)
hour(x) <- 1
hour(x) <- 25
View
@@ -0,0 +1,22 @@
+\docType{data}
+\name{lubridate_formats}
+\alias{lubridate_formats}
+\title{Lubridate formats used in \code{ymd}, \code{hms} and \code{ymd_hms} family of functions.}
+\format{Named list with formats.}
+\usage{
+ lubridate_formats
+}
+\description{
+ These formats are passed to \code{parseDateTime} low
+ level parsing function.
+}
+\examples{
+str(lubridate_formats)
+}
+\seealso{
+ \code{\link{parseDateTime}}, \code{\link{ymd}},
+ \code{\link{ymd_hms}}
+}
+\keyword{chron}
+\keyword{datasets}
+
View
@@ -17,7 +17,7 @@
jul, timeSeries, and fts objects.
}
\examples{
-x <- now()
+x <- ymd("2012-03-26")
minute(x)
minute(x) <- 1
minute(x) <- 61
Oops, something went wrong.

0 comments on commit a61cae1

Please sign in to comment.