EVOLUTION-MANAGER
Edit File: round.POSIXt.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Round / Truncate Data-Time Objects</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for round.POSIXt {base}"><tr><td>round.POSIXt {base}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Round / Truncate Data-Time Objects</h2> <h3>Description</h3> <p>Round or truncate date-time objects. </p> <h3>Usage</h3> <pre> ## S3 method for class 'POSIXt' round(x, units = c("secs", "mins", "hours", "days", "months", "years")) ## S3 method for class 'POSIXt' trunc(x, units = c("secs", "mins", "hours", "days", "months", "years"), ...) ## S3 method for class 'Date' round(x, ...) ## S3 method for class 'Date' trunc(x, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>an object inheriting from <code>"POSIXt"</code> or <code>"Date"</code>.</p> </td></tr> <tr valign="top"><td><code>units</code></td> <td> <p>one of the units listed. Can be abbreviated.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>arguments to be passed to or from other methods, notably <code>digits</code> for <code>round</code>.</p> </td></tr> </table> <h3>Details</h3> <p>The time is rounded or truncated to the second, minute, hour, day, month or year. Time zones are only relevant to days or more, when midnight in the current <a href="timezones.html">time zone</a> is used. </p> <p>The methods for class <code>"Date"</code> are of little use except to remove fractional days. </p> <h3>Value</h3> <p>An object of class <code>"POSIXlt"</code> or <code>"Date"</code>. </p> <h3>See Also</h3> <p><code><a href="Round.html">round</a></code> for the generic function and default methods. </p> <p><code><a href="DateTimeClasses.html">DateTimeClasses</a></code>, <code><a href="Dates.html">Date</a></code> </p> <h3>Examples</h3> <pre> round(.leap.seconds + 1000, "hour") trunc(Sys.time(), "day") </pre> <hr /><div style="text-align: center;">[Package <em>base</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>