[R] Build POSIXlt object from its internal representation list
Ian Worthington
|@nworth|ngton @end|ng |rom y@hoo@com
Tue Jul 7 18:27:13 CEST 2026
Do you have to use list? If not, take a look at dput, maybe?
Best wishes / Mejores deseos / Meilleurs vœux
Ian ...
On Tuesday, July 7, 2026 at 11:03:50 AM GMT-5, iagogv via R-help <r-help using r-project.org> wrote:
Hi all,
From DateTimeClasses help:
Class "POSIXlt" is internally a list [1] of vectors with components
named sec, min, hour for the time, mday, mon, and year, for the date,
wday, yday for the day of the week and day of the year, isdst, a
Daylight Saving Time flag, and sometimes (both _optional_) zone, a
string for the time zone, and gmtoff, offset in seconds from GMT
If I unlist(x), where x is a POSIXlt object, I get that list, internal
representation of x.
Is there an inverse function returning the POSIXlt object from that
list?
Thank you!
Best,
Iago
Links:
------
[1] http://127.0.0.1:25406/library/base/help/list
[[alternative HTML version deleted]]
______________________________________________
R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide https://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help
mailing list