Skip to content
Back to formatted view

Raw Message

Message-ID: <9037AD40-0F1B-4A58-9BA3-93DE62948634@comcast.net>
Date: 2022-07-18T23:58:11Z
From: David Winsemius
Subject: Using R lines() to show sunrise and sunset
In-Reply-To: <8A6505C0-10DA-4BD8-81C7-25E18B86498F@me.com>

The first thought it to do is make sure you have the data in POSIXct format for the date times. 

Sent from my iPhone

> On Jul 18, 2022, at 6:51 PM, Gregory Coats via R-help <r-help at r-project.org> wrote:
> 
> ?I compiled a program on my Apple MacBook that takes as inputs
>    Year and Month and Day
>    Latitude and Longitude
> And then computes these two outputs
> Sunrise Year-Month-Day Hour:Minute:Second
> Sunset  Year-Month-Day Hour:Minute:Second
> It automatically handles Daylight Savings Time.
> A typical input, followed by the automatically computed outputs looks likes this.
> 
> ./sunrise_05 2022 01 1 38.8586314239524 77.0512533684194
> 2022-01-01 07:26:45 2022-01-01 16:57:07
> ./sunrise_05 2022 01 2 38.8586314239524 77.0512533684194
> 2022-01-02 07:26:52 2022-01-02 16:57:56
> 
> I want to use R?s lines() command to show the sunrise and sunset times for the year 2012. How do I tell R that the first computed output is sunrise, and the second computer output is sunset?
> Greg Coats
>    [[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.