An alternative is the lubridate() package if you use tidyverse.
Check the data for daylight savings time. Twice per year Virginia changes time
where in the Fall clocks are shifted back an hour and in the Spring they jump
forwards an hour.
-Original Message-
From: R-help On Behalf Of Jeff Newmiller
Sent: Monday, July 18, 2022 12:35 AM
To: Greg Comcast Coats ; Gregory Coats via R-help
Subject: Re: [R] Date and Time
[External Email]
Maybe this [1] will help? Or just read ?strptime...
You can also calculate sunrise/sunset (crepuscule) using maptools, but you need
to be careful with timezones.
[1]
https://urldefense.proofpoint.com/v2/url?u=https-3A__jdnewmil.github.io_time-2D2018-2D10_MoreDatetimeHowto.html=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAsRzsn7AkP-g=Eym42IWzdKGREg7m9o0QowA8hP-DgHTrlZwDfW5no2rP6ND_uFJKHbJ_Dj3XGPiP=O5VruA8vvqyhQngUZ3fuZtnZiYIm9XEscpzxcGKX9AQ=
On July 17, 2022 8:47:19 PM PDT, Gregory Coats via R-help
wrote:
>For the year from 2022-01-01 to 2022-12-31, I computed the sunrise and sunset
>times for Reston, Virginia, USA. I am seeking the syntax to direct R to read
>in these dates and times, and then graphical plot the sunrise and sunset times
>for each day in the year 2022. How do I tell R that I store the Sunrise Date
>and Time like this?
>-mm-dd HH:MM:SS
>2022-01-01 7:28:10
>2022-01-02 7:28:17
>Greg Coats
> [[alternative HTML version deleted]]
>
>__
>R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailm
>an_listinfo_r-2Dhelp=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAsRz
>sn7AkP-g=Eym42IWzdKGREg7m9o0QowA8hP-DgHTrlZwDfW5no2rP6ND_uFJKHbJ_Dj3X
>GPiP=7XAM9jGAgm-2KbQG5x3oKKxrvNESM5DAvl_O3YxSU3Y=
>PLEASE do read the posting guide
>https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org
>_posting-2Dguide.html=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAsR
>zsn7AkP-g=Eym42IWzdKGREg7m9o0QowA8hP-DgHTrlZwDfW5no2rP6ND_uFJKHbJ_Dj3
>XGPiP=MwaLmYJXfAwQDsHSzq8Atm-QC2YpJYie_L5oNkAJiVg=
>and provide commented, minimal, self-contained, reproducible code.
--
Sent from my phone. Please excuse my brevity.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://urldefense.proofpoint.com/v2/url?u=https-3A__stat.ethz.ch_mailman_listinfo_r-2Dhelp=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAsRzsn7AkP-g=Eym42IWzdKGREg7m9o0QowA8hP-DgHTrlZwDfW5no2rP6ND_uFJKHbJ_Dj3XGPiP=7XAM9jGAgm-2KbQG5x3oKKxrvNESM5DAvl_O3YxSU3Y=
PLEASE do read the posting guide
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.R-2Dproject.org_posting-2Dguide.html=DwICAg=sJ6xIWYx-zLMB3EPkvcnVg=9PEhQh2kVeAsRzsn7AkP-g=Eym42IWzdKGREg7m9o0QowA8hP-DgHTrlZwDfW5no2rP6ND_uFJKHbJ_Dj3XGPiP=MwaLmYJXfAwQDsHSzq8Atm-QC2YpJYie_L5oNkAJiVg=
and provide commented, minimal, self-contained, reproducible code.
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.