Re: [R] maptools sunrise sunset function

From: stephen sefick <ssefick_at_gmail.com>
Date: Mon, 10 Nov 2008 18:04:20 -0500

try tz="America/Los_Angeles" it was three hours before tz="America/New_York"

On Mon, Nov 10, 2008 at 4:25 PM, Sebastian P. Luque <spluque_at_gmail.com> wrote:
> On Mon, 10 Nov 2008 15:27:52 -0500,
> "stephen sefick" <ssefick_at_gmail.com> wrote:
>
>> library(maptools) sunrise.set <- function(lat, long, date,
>> timezone="UTC", num.days=1){ #this needs to be long lat# lat.long <-
>> matrix(c(long, lat), nrow=1) day <- as.POSIXct(date, tz=timezone)
>> sequence <- seq(from=day, length.out=num.days , by="days") sunrise <-
>> sunriset(lat.long, sequence, direction="sunrise", POSIXct=TRUE) sunset
>> <- sunriset(lat.long, sequence, direction="sunset", POSIXct=TRUE) ss
>> <- data.frame(sunrise, sunset) ss <- ss[,-c(1,3)]
>> colnames(ss)<-c("sunrise", "sunset") return(ss)
>> }
>
>> I believe that he is refering to the code that I wrote above, which
>> relies heavily on map tools (to say the least).
>
> So what's the problem? You specified timezone="UTC" so that's what
> you're getting. WRT the warnings I do not get them, but the string
> passed may be wrong or some definitions as missing from his system.
> Sorry I cannot help with that.
>
>
> --
> Seb
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> 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.
>

-- 
Stephen Sefick
Research Scientist
Southeastern Natural Sciences Academy

Let's not spend our time and resources thinking about things that are
so little or so large that all they really do for us is puff us up and
make us feel like gods.  We are mammals, and have not exhausted the
annoying little problems of being mammals.

								-K. Mullis

______________________________________________
R-help_at_r-project.org mailing list
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.
Received on Mon 10 Nov 2008 - 23:15:13 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 10 Nov 2008 - 23:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive