[R] No "number of days" format for 'difftime'?
Loris Bennett
loris.bennett at fu-berlin.de
Mon Aug 8 11:37:33 CEST 2016
Hi,
When I try
d <- as.difftime("6-08:18:33",format=%d-%H:%M:%S")
I get:
Error: unexpected SPECIAL in "as.difftime("6-08:18:33",format=%d-%"
Am I correct in thinking that it is not possible to do something like
this, because there is no character string for the format which
corresponds to "number of days"?
I could misuse "%j" for "day of the year as a decimal number", but
ultimately the "difftime" object is still a data, rather than a length
of time and I should be looking at a package like 'lubridate' instead.
Is that the case?
Cheers,
Loris
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.bennett at fu-berlin.de
More information about the R-help
mailing list