Learn R Programming

timetools (version 1.5.2)

POSIXst-class: Class "POSIXst"

Description

Class to define POSIXst object such as hours of day, seconds of year, etc.

Arguments

Details

Objects of this class are used to represent subtimes. A subtime (or a POSIXst, st stand for Sub and Time) is a subdivision of time :
  • second of a minute ;
  • second of an hour ;
  • second of a day ;
  • second of a week ;
  • second of a month ;
  • second of a year ;
  • minute of an hour ;
  • minute of a day ;
  • ...
  • minute of a year ;
  • ...
  • month of year ;
  • year AD (after death).

A POSIXst is a kind of time object composed of 2 units and a positionnal integer. The main unit can be accessed via the of function ; the sub unit can be accessed via the unit function. The positionnal integer correspond to the value of the subtime object. Consequently, a subtime st is the valueth unit(st) of of(st).

The range of valid values for each kind of POSIXst is defined accordingly to the DateTimeClasses definitions. For instance valid values for seconds of hour are 0 to 61, valid values for day of week are 0 to 6, etc.

To define POSIXst objects see the POSIXst constructor. It allows to define a POSIXst object from scratch or to use a POSIXct object.

Moreover, a POSIXst object has a timezone slots. This is defined for compatibility reason with POSIXct object and also with TimeInstantDataFrame, TimeIntervalDataFrame and SubtimeDataFrame.

To list all methods available for POSIXst, type in the R console :

methods(class='POSIXst') # for S3 methods}

showMethods(class='POSIXst') # for S4 methods}

To get back to this documentation from the R console : class?POSIXst

Objects from the Class
{ Objects can be created by calls of the form
  • new("POSIXst", ...)...argument must be replaced by named arguments coresponding to slots of a POSIXst (see below). See alsonew.
  • POSIXst (x, unit, of, ...)Create a POSIXst from various type of object. SeePOSIXst.
}
Slots
{ [object Object],[object Object],[object Object],[object Object] }
Manipulate POSIXctp
{ [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] }
Access to POSIXst properties
{ [object Object],[object Object],[object Object],[object Object] }
Text representation
{ [object Object],[object Object],[object Object],[object Object],[object Object],[object Object] } POSIXct, POSIXcti, POSIXctp, TimeIntervalDataFrame, showClass("POSIXst") classes