r recognizing time columns from integer and float columns -


i have multiple columns integer , float data in them. want recognize of columns have date , time data. example column values 2,3 not time data column values "1959-12-31 17:00:02 mst" has date , time values. how can in robust way?

i thought using as.posixct() function. realized as.posixct(2, origin = "1960-01-01") converts 2 time , makes recognizing time values difficult :(

> z=2 > as.posixct(z, origin = "1960-01-01")   [1] "1959-12-31 17:00:02 mst" > z1 <- sys.time() > z1 [1] "2014-12-01 19:08:21 mst" > class(z1) [1] "posixct" "posixt"  > unclass(z)  [1] 2 > unclass(z1)  [1] 1417486102 > z1 [1] "2014-12-01 19:08:21 mst" > as.posixct(z, origin = "1960-01-01") [1] "1959-12-31 17:00:02 mst" 


Comments

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -