Learn R Programming

crawl (version 2.3.0)

intToPOSIX: Reverse as.numeric command that is performed on a vector of type POSIXct

Description

Takes integer value produced by as.numeric(x), where x is a POSIXct vector and returns it to a POSIXct vector

Usage

intToPOSIX(timeVector, tz = "GMT")

Value

POSIXct vector

Arguments

timeVector

A vector of integers produced by as.numeric applied to a PSIXct vector

tz

Time zone of the vector (see as.POSIXct).

Author

Devin S. Johnson

Examples

Run this code

#library(crawl)
timeVector <- as.numeric(Sys.time())
timeVector
intToPOSIX(timeVector, tz="")

Run the code above in your browser using DataLab