The R Project SVN R

Rev

Rev 87594 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 87594 Rev 87666
Line 1... Line 1...
1
% File src/library/base/man/difftime.Rd
1
% File src/library/base/man/difftime.Rd
2
% Part of the R package, https://www.R-project.org
2
% Part of the R package, https://www.R-project.org
3
% Copyright 1995-2024 R Core Team
3
% Copyright 1995-2025 R Core Team
4
% Distributed under GPL 2 or later
4
% Distributed under GPL 2 or later
5
 
5
 
6
\name{difftime}
6
\name{difftime}
7
\title{Time Intervals / Differences}
7
\title{Time Intervals / Differences}
8
\alias{difftime}
8
\alias{difftime}
Line 39... Line 39...
39
         units = c("auto", "secs", "mins", "hours",
39
         units = c("auto", "secs", "mins", "hours",
40
                   "days", "weeks"))
40
                   "days", "weeks"))
41
 
41
 
42
as.difftime(tim, format = "\%X", units = "auto", tz = "UTC")
42
as.difftime(tim, format = "\%X", units = "auto", tz = "UTC")
43
 
43
 
44
\method{format}{difftime}(x, ...)
44
\method{format}{difftime}(x, ..., with.units = TRUE)
45
\method{units}{difftime}(x)
45
\method{units}{difftime}(x)
46
\method{units}{difftime}(x) <- value
46
\method{units}{difftime}(x) <- value
47
\method{as.double}{difftime}(x, units = "auto", ...)
47
\method{as.double}{difftime}(x, units = "auto", ...)
48
 
48
 
49
## Group methods, notably for round(), signif(), floor(),
49
## Group methods, notably for round(), signif(), floor(),
Line 61... Line 61...
61
  \item{tim}{character string or numeric value specifying a time interval.}
61
  \item{tim}{character string or numeric value specifying a time interval.}
62
  \item{format}{character specifying the format of \code{tim}: see
62
  \item{format}{character specifying the format of \code{tim}: see
63
    \code{\link{strptime}}.  The default is a locale-specific time format.}
63
    \code{\link{strptime}}.  The default is a locale-specific time format.}
64
  \item{x}{an object inheriting from class \code{"difftime"}.}
64
  \item{x}{an object inheriting from class \code{"difftime"}.}
65
  \item{\dots}{arguments to be passed to or from other methods.}
65
  \item{\dots}{arguments to be passed to or from other methods.}
-
 
66
  \item{with.units}{(for the  \code{format()} method:) logical indicating
-
 
67
    the units should be part, e.g., "3.5 hours"; if false, the units are
-
 
68
    suppressed.}
66
}
69
}
67
\details{
70
\details{
68
  Function \code{difftime} calculates a difference of two date/time
71
  Function \code{difftime} calculates a difference of two date/time
69
  objects, \code{time1} (end) and \code{time2} (beginning), and
72
  objects, \code{time1} (end) and \code{time2} (beginning), and
70
  returns an object of class \code{"difftime"} with an
73
  returns an object of class \code{"difftime"} with an