The R Project SVN R

Rev

Rev 68948 | Rev 82360 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68948 Rev 73945
Line 11... Line 11...
11
\title{Round / Truncate Data-Time Objects}
11
\title{Round / Truncate Data-Time Objects}
12
\description{
12
\description{
13
  Round or truncate date-time objects.
13
  Round or truncate date-time objects.
14
}
14
}
15
\usage{
15
\usage{
-
 
16
\method{round}{POSIXt}(x,
16
\method{round}{POSIXt}(x, units = c("secs", "mins", "hours", "days"))
17
      units = c("secs", "mins", "hours", "days", "months", "years"))
-
 
18
\method{trunc}{POSIXt}(x,
17
\method{trunc}{POSIXt}(x, units = c("secs", "mins", "hours", "days"), \dots)
19
      units = c("secs", "mins", "hours", "days", "months", "years"),
-
 
20
      \dots)
18
 
21
 
19
\method{round}{Date}(x, \dots)
22
\method{round}{Date}(x, \dots)
20
\method{trunc}{Date}(x, \dots)
23
\method{trunc}{Date}(x, \dots)
21
}
24
}
22
\arguments{
25
\arguments{
Line 24... Line 27...
24
  \item{units}{one of the units listed.  Can be abbreviated.}
27
  \item{units}{one of the units listed.  Can be abbreviated.}
25
  \item{\dots}{arguments to be passed to or from other methods, notably
28
  \item{\dots}{arguments to be passed to or from other methods, notably
26
    \code{digits} for \code{round}.}
29
    \code{digits} for \code{round}.}
27
}
30
}
28
\details{
31
\details{
29
  The time is rounded or truncated to the second, minute, hour or day.
32
  The time is rounded or truncated to the second, minute, hour, day,
30
  Time zones are only relevant to days, when midnight in the current
33
  month or year.  Time zones are only relevant to days or more, when
31
  \link{time zone} is used.
34
  midnight in the current \link{time zone} is used.
32
 
35
 
33
  The methods for class \code{"Date"} are of little use except to remove
36
  The methods for class \code{"Date"} are of little use except to remove
34
  fractional days.
37
  fractional days.
35
}
38
}
36
\value{
39
\value{