How do I extract time from a series of POSIXct objects that discard part of a date?
For example, I have:
times <- structure(c(1331086009.50098, 1331091427.42461, 1331252565.99979, 1331252675.81601, 1331262597.72474, 1331262641.11786, 1331269557.4059, 1331278779.26727, 1331448476.96126, 1331452596.13806), class = c("POSIXct", "POSIXt"))
which matches these dates:
"2012-03-07 03:06:49 CET" "2012-03-07 04:37:07 CET" "2012-03-09 01:22:45 CET" "2012-03-09 01:24:35 CET" "2012-03-09 04:09:57 CET" "2012-03-09 04:10:41 CET" "2012-03-09 06:05:57 CET" "2012-03-09 08:39:39 CET" "2012-03-11 07:47:56 CET" "2012-03-11 08:56:36 CET"
Now I have some values ββfor the parameter measured at this time
val <- c(1.25343125e-05, 0.00022890575, 3.9269125e-05, 0.0002285681875, 4.26353125e-05, 5.982625e-05, 2.09575e-05, 0.0001516951251, 2.653125e-05, 0.0001021391875)
I would like to build val vs time of day, no matter what day val was measured.
Is there a specific function that would allow me to do this?
date time r posixct
nico Mar 23 2018-12-12T00: 00Z
source share